class MyCustomAction extends Action{ protected function setUp(): void { parent::setUp(); $someRecord = $this->getRecord(); }}
class MyCustomAction extends Action{ protected function setUp(): void { parent::setUp(); $someRecord = $this->getRecord(); }}
Then use that custom action In a Page
protected function getHeaderActions(): array{ return [ MyCustomAction::make('my-action')->record($this->getRecord()), ];}
protected function getHeaderActions(): array{ return [ MyCustomAction::make('my-action')->record($this->getRecord()), ];}
Now in V4, $this->getRecord() is NULL because setUp() runs before the built in ->record() method. So what is the best practise on extending Action in classes for v4? I could. not find anything in the new docs.