Class
public static function factory(string $identifier, string $display, $callable, array $params = [], array $permissions = [], bool $active = true, bool $allowSamePage = false, bool $preferIsolation = false): CustomActionInitialise the CustomAction object providing the data that will be used on output.
Parameters
| Type | Name | Description |
|---|---|---|
string | $identifier | The string used to identify the CustomAction object. |
string | $display | The string displayed in the Client Area. |
mixed | $callable | The invoked function when interacting with the CustomAction object. |
array | $params | An array of parameters to be used when the provided function is called. |
array | $permissions | An array of permissions required to see and click the CustomAction object. |
bool | $active | A boolean representing whether the CustomAction should be disabled on render. |
bool | $allowSamePage | Set to true if the result of custom action can be rendered on the same page |
Returns CustomAction
public function getIdentifier(): stringGet the identifier for the CustomAction object.
Returns string
public function getDisplay(): stringGet the display for the CustomAction object.
Returns string
public function invokeCallable(): arrayInvoke the callable function for the CustomAction object.
Returns array
public function getPermissions(): arrayGet the permissions for the CustomAction object.
Returns string[]
public function isActive(): boolReturns bool
public function isAllowSamePage(): boolReturns bool
public function isPreferIsolation(): boolReturns bool