Actions button omit stating `->action(function_name)`

the question is, is it possible to omit stating ->action(function_name) and have the function called automatically? is it not possible or I missed out in the doc very often I have action buttons in page/form and is defined as below
protected function getFormActions(): array
{
return [
$this->getSaveFormAction(),
Action::make('approve')
->action('approve'),
Action::make('reject')
->action('reject')
];
}
protected function getFormActions(): array
{
return [
$this->getSaveFormAction(),
Action::make('approve')
->action('approve'),
Action::make('reject')
->action('reject')
];
}
and have the functions defined as
public function approve()
{
//
}

public function reject()
{
//
}
public function approve()
{
//
}

public function reject()
{
//
}
1 Reply
Dennis Koch
Dennis Koch8mo ago
I don't think that's possible Unless you overwrite all the setUp methods