function ConditionManager::getDefinitions

Overrides ContextAwarePluginManagerTrait::getDefinitions

File

src/Core/ConditionManager.php, line 40

Class

ConditionManager
Extends the core condition manager to add in Rules' context improvements.

Namespace

Drupal\rules\Core

Code

public function getDefinitions() {
    $definitions = parent::getDefinitions();
    // Make sure that all definitions have a category to avoid PHP notices in
    // CategorizingPluginManagerTrait.
    // @todo Fix this in core in CategorizingPluginManagerTrait.
    foreach ($definitions as &$definition) {
        if (!isset($definition['category'])) {
            $definition['category'] = $this->t('Other');
        }
    }
    return $definitions;
}