You are here

interface RulesEventHandlerInterface in Rules 8.3

Interface for Rules event handlers.

Event handlers provide access to the metadata of events.

Hierarchy

Expanded class hierarchy of RulesEventHandlerInterface

All classes that implement RulesEventHandlerInterface

See also

\Drupal\rules\Core\RulesDefaultEventHandler

File

src/Core/RulesEventHandlerInterface.php, line 15

Namespace

Drupal\rules\Core
View source
interface RulesEventHandlerInterface extends PluginInspectionInterface, DerivativeInspectionInterface {

  /**
   * Gets the context definitions of the event.
   *
   * @return \Drupal\rules\Context\ContextDefinitionInterface[]
   *   The array of context definitions, keyed by context name.
   */
  public function getContextDefinitions();

  /**
   * Gets a specific context definition of the plugin.
   *
   * @param string $name
   *   The name of the context in the plugin definition.
   *
   * @return \Drupal\rules\Context\ContextDefinitionInterface
   *   The definition against which the context value must validate.
   *
   * @throws \Drupal\Component\Plugin\Exception\PluginException
   *   If the requested context is not defined.
   */
  public function getContextDefinition($name);

}

Members

Namesort descending Modifiers Type Description Overrides
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
RulesEventHandlerInterface::getContextDefinition public function Gets a specific context definition of the plugin. 1
RulesEventHandlerInterface::getContextDefinitions public function Gets the context definitions of the event. 1