function ExpressionManager::createCondition

Overrides ExpressionManagerInterface::createCondition

File

src/Engine/ExpressionManager.php, line 76

Class

ExpressionManager
Plugin manager for all Rules expressions.

Namespace

Drupal\rules\Engine

Code

public function createCondition($id, ContextConfig $configuration = NULL) {
    $config_array = is_null($configuration) ? [] : $configuration->toArray();
    return $this->createInstance('rules_condition', [
        'condition_id' => $id,
    ] + $config_array);
}