function RulesComponentConfig::getProvidedContextDefinitions

Gets the definitions of the provided context.

Return value

\Drupal\rules\Context\ContextDefinitionInterface[] The array of context definition, keyed by context name.

File

src/Entity/RulesComponentConfig.php, line 189

Class

RulesComponentConfig
Rules component configuration entity to persistently store configuration.

Namespace

Drupal\rules\Entity

Code

public function getProvidedContextDefinitions() {
    $definitions = [];
    if (!empty($this->component['provided_context_definitions'])) {
        foreach ($this->component['provided_context_definitions'] as $name => $definition) {
            $definitions[$name] = ContextDefinition::createFromArray($definition);
        }
    }
    return $definitions;
}