function ContextProviderTrait::getProvidedContextDefinition
See also
\Drupal\rules\Context\ContextProviderInterface
1 call to ContextProviderTrait::getProvidedContextDefinition()
- ContextProviderTrait::getProvidedContext in src/
Context/ ContextProviderTrait.php
File
-
src/
Context/ ContextProviderTrait.php, line 53
Class
- ContextProviderTrait
- A trait implementing the ContextProviderInterface.
Namespace
Drupal\rules\ContextCode
public function getProvidedContextDefinition($name) {
$definition = $this->getPluginDefinition();
if (empty($definition['provides'][$name])) {
throw new ContextException(sprintf("The provided context '%s' is not valid.", $name));
}
return $definition['provides'][$name];
}