function RulesComponentConfig::setProvidedContextDefinitions
Sets the definitions of the provided context.
Parameters
\Drupal\rules\Context\ContextDefinitionInterface[] $definitions: The array of context definitions, keyed by context name.
Return value
$this
File
-
src/
Entity/ RulesComponentConfig.php, line 207
Class
- RulesComponentConfig
- Rules component configuration entity to persistently store configuration.
Namespace
Drupal\rules\EntityCode
public function setProvidedContextDefinitions(array $definitions) {
$this->component['provided_context_definitions'] = [];
foreach ($definitions as $name => $definition) {
$this->component['provided_context_definitions'][$name] = $definition->toArray();
}
return $this;
}