You are here

public function RulesDefaultEventHandler::getContextDefinitions in Rules 8.3

Gets the context definitions of the event.

Return value

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

Overrides RulesEventHandlerInterface::getContextDefinitions

1 call to RulesDefaultEventHandler::getContextDefinitions()
RulesDefaultEventHandler::getContextDefinition in src/Core/RulesDefaultEventHandler.php
Gets a specific context definition of the plugin.

File

src/Core/RulesDefaultEventHandler.php, line 16

Class

RulesDefaultEventHandler
Default event handler class.

Namespace

Drupal\rules\Core

Code

public function getContextDefinitions() {
  $definition = $this
    ->getPluginDefinition();
  if ($this instanceof RulesConfigurableEventHandlerInterface) {
    $this
      ->refineContextDefinitions();
  }
  return !empty($definition['context_definitions']) ? $definition['context_definitions'] : [];
}