interface RulesEventHandlerInterface

Same name in other branches
  1. 7.x-2.x includes/rules.event.inc \RulesEventHandlerInterface

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

Title Sort descending Modifiers Object type Summary 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. 6
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