You are here

public function ActionExpressionContainer::__construct in Rules 8.3

Constructor.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\rules\Engine\ExpressionManagerInterface $expression_manager: The rules expression plugin manager.

\Drupal\Core\Logger\LoggerChannelInterface $logger: The Rules debug logger channel.

Overrides ExpressionBase::__construct

File

src/Engine/ActionExpressionContainer.php, line 36

Class

ActionExpressionContainer
Container for actions.

Namespace

Drupal\rules\Engine

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, ExpressionManagerInterface $expression_manager, LoggerChannelInterface $logger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->expressionManager = $expression_manager;
  $this->rulesDebugLogger = $logger;
  $configuration += [
    'actions' => [],
  ];
  foreach ($configuration['actions'] as $action_config) {
    $action = $expression_manager
      ->createInstance($action_config['id'], $action_config);
    $this->actions[] = $action;
  }
}