How to get ownerRecord inside RecordImporter?

Lets setup 2 models. Event & People. The relationship is n to n.

Inside the edit component of the event resource i added a relation manager - PeopleRelationManager.

Now i started to configure the PeopleImporter so my users can import people into the event they are editing.

The question is, can I somehow get the ownerRecord so i can attach the people imported to the current event?

So far it works (the models are created), but the people arent attached to the event

this is how it looks so far:
->headerActions([
    Tables\Actions\ImportAction::make('importPeople')->importer(PeopleImporter::class),
])

now i'm trying to pass in somehow the id of the event, but idk how to retrieve it inside the PeopleImporter class:
->headerActions([
    Tables\Actions\ImportAction::make('importPeople')->importer(PeopleImporter::class)->call([
        'ownerRecord' => $this->getOwnerRecord(),
    ]),
])
Was this page helpful?