function RulesEventManager::processDefinition

Overrides DefaultPluginManager::processDefinition

File

src/Core/RulesEventManager.php, line 90

Class

RulesEventManager
Plugin manager for Rules events that can be triggered.

Namespace

Drupal\rules\Core

Code

public function processDefinition(&$definition, $plugin_id) {
    parent::processDefinition($definition, $plugin_id);
    if (!isset($definition['context_definitions'])) {
        $definition['context_definitions'] = [];
    }
    // Convert the flat context_definitions arrays to ContextDefinition objects.
    foreach ($definition['context_definitions'] as $context_name => $values) {
        $definition['context_definitions'][$context_name] = ContextDefinition::createFromArray($values);
    }
}