function ConditionExpressionContainer::__construct
Constructs a new class instance.
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/ ConditionExpressionContainer.php, line 37
Class
- ConditionExpressionContainer
- Container for conditions.
Namespace
Drupal\rules\EngineCode
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 += [
'conditions' => [],
];
foreach ($configuration['conditions'] as $condition_config) {
$condition = $this->expressionManager
->createInstance($condition_config['id'], $condition_config);
$this->conditions[] = $condition;
}
}