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')
    ];
}


and have the functions defined as
public function approve()
{
  //
}

public function reject()
{
  //
}
Was this page helpful?