function ExpressionManager::createInstance

Overrides PluginManagerBase::createInstance

6 calls to ExpressionManager::createInstance()
ExpressionManager::createAction in src/Engine/ExpressionManager.php
Creates a new action expression.
ExpressionManager::createActionSet in src/Engine/ExpressionManager.php
Creates a new action set.
ExpressionManager::createAnd in src/Engine/ExpressionManager.php
Creates a new 'and' condition container.
ExpressionManager::createCondition in src/Engine/ExpressionManager.php
Creates a new condition expression.
ExpressionManager::createOr in src/Engine/ExpressionManager.php
Creates a new 'or' condition container.

... See full list

File

src/Engine/ExpressionManager.php, line 37

Class

ExpressionManager
Plugin manager for all Rules expressions.

Namespace

Drupal\rules\Engine

Code

public function createInstance($plugin_id, array $configuration = []) {
    $instance = parent::createInstance($plugin_id, $configuration);
    // Make sure that the instance has a UUID and generate one if necessary.
    if (!$instance->getUuid()) {
        $instance->setUuid($this->uuidService
            ->generate());
    }
    return $instance;
}