function RulesDefaultEventHandler::getContextDefinition

Overrides RulesEventHandlerInterface::getContextDefinition

File

src/Core/RulesDefaultEventHandler.php, line 27

Class

RulesDefaultEventHandler
Default event handler class.

Namespace

Drupal\rules\Core

Code

public function getContextDefinition($name) {
    $definitions = $this->getContextDefinitions();
    if (empty($definitions[$name])) {
        throw new ContextException(sprintf("The context '%s' is not a valid context.", $name));
    }
    return $definitions[$name];
}