# ExternalActionConfiguration

> Represents an external action definition of yii\base\Controller::actions() whose class and assignment path are proven.

[API reference](/docs/api/index.md) › [PHPStan](/docs/extensions/phpstan/reference/index.md) › [rules](/docs/extensions/phpstan/reference/rules/index.md) › ExternalActionConfiguration

| final readonly class | `yii2\extensions\phpstan\rules\ExternalActionConfiguration` |
| --- | --- |
| Source | [`src/rules/ExternalActionConfiguration.php`](https://github.com/yii2-extensions/phpstan/blob/main/src/rules/ExternalActionConfiguration.php#L14) |

Represents an external action definition of [`Controller::actions()`](/docs/api/yii/base/controller/index.md#method-actions) whose class and assignment path are proven.

[`ExternalActionConfigurationResolver`](/docs/extensions/phpstan/reference/rules/externalactionconfigurationresolver/index.md) for the conditions under which a definition is resolved.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-actionId"></span>`$actionId` readonly constructor | `string` | Action ID that maps to the definition. | `ExternalActionConfiguration` |
| <span id="property-configuration"></span>`$configuration` readonly constructor | [`CreateObjectConfiguration`](/docs/extensions/phpstan/reference/rules/createobjectconfiguration/index.md) | Configuration that `Yii::createObject()` receives from [`Controller::createAction()`](/docs/api/yii/base/controller/index.md#method-createAction). | `ExternalActionConfiguration` |
| <span id="property-controllerClass"></span>`$controllerClass` readonly constructor | `string` | Controller whose `actions()` returns the definition, as PHPStan displays it. | `ExternalActionConfiguration` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Stores the controller, action ID and resolved action configuration. | `ExternalActionConfiguration` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(string $controllerClass, string $actionId, yii2\extensions\phpstan\rules\CreateObjectConfiguration $configuration)
```

Stores the controller, action ID and resolved action configuration.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$controllerClass` | `string` | Controller whose `actions()` returns the definition, as PHPStan displays it. |
| `$actionId` | `string` | Action ID that maps to the definition. |
| `$configuration` | [`CreateObjectConfiguration`](/docs/extensions/phpstan/reference/rules/createobjectconfiguration/index.md) | Configuration that `Yii::createObject()` receives from [`Controller::createAction()`](/docs/api/yii/base/controller/index.md#method-createAction). |