public function RulesEventManager::processDefinition in Rules 8.3
Performs extra processing on plugin definitions.
By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.
Overrides DefaultPluginManager::processDefinition
File
- src/
Core/ RulesEventManager.php, line 90
Class
- RulesEventManager
- Plugin manager for Rules events that can be triggered.
Namespace
Drupal\rules\CoreCode
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);
}
}