# WHMCS\Module\Server\CustomAction

`Class`

## Methods

### factory

```php
public static function factory(string $identifier, string $display, $callable, array $params = [], array $permissions = [], bool $active = true, bool $allowSamePage = false, bool $preferIsolation = false): CustomAction
```

Initialise 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`

### getIdentifier

```php
public function getIdentifier(): string
```

Get the identifier for the CustomAction object.

**Returns** `string`

### getDisplay

```php
public function getDisplay(): string
```

Get the display for the CustomAction object.

**Returns** `string`

### invokeCallable

```php
public function invokeCallable(): array
```

Invoke the callable function for the CustomAction object.

**Returns** `array`

### getPermissions

```php
public function getPermissions(): array
```

Get the permissions for the CustomAction object.

**Returns** `string[]`

### isActive

```php
public function isActive(): bool
```

**Returns** `bool`

### isAllowSamePage

```php
public function isAllowSamePage(): bool
```

**Returns** `bool`

### isPreferIsolation

```php
public function isPreferIsolation(): bool
```

**Returns** `bool`