You are here

class RulesAction in Rules 8.3

Defines a Rules Action annotation object.

Plugin Namespace: Plugin\RulesAction.

For a working example, see \Drupal\rules\Plugin\RulesAction\BanIP

Hierarchy

Expanded class hierarchy of RulesAction

See also

\Drupal\rules\Core\RulesActionInterface

\Drupal\rules\Core\RulesActionManagerInterface

\Drupal\rules\Core\RulesActionBase

Plugin API

1 file declares its use of RulesAction
RulesActionManager.php in src/Core/RulesActionManager.php
12 classes are annotated with RulesAction
NodeMakeSticky in src/Plugin/RulesAction/NodeMakeSticky.php
Makes a content item sticky.
NodeMakeUnsticky in src/Plugin/RulesAction/NodeMakeUnsticky.php
Makes a content item not sticky.
NodePromote in src/Plugin/RulesAction/NodePromote.php
Promotes a content item.
NodePublish in src/Plugin/RulesAction/NodePublish.php
Publishes a content item.
NodeUnpromote in src/Plugin/RulesAction/NodeUnpromote.php
Demotes a content item.

... See full list

File

src/Core/Annotation/RulesAction.php, line 21

Namespace

Drupal\rules\Core\Annotation
View source
class RulesAction extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the action plugin.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * The category under which the action should be listed in the UI.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $category;

  /**
   * The permission required to access the configuration UI for this plugin.
   *
   * @var string[]
   *   Array of permission strings as declared in a *.permissions.yml file. If
   *   any one of these permissions apply for the relevant user, we allow
   *   access.
   */
  public $configure_permission;

  /**
   * An array of context definitions describing the context used by the plugin.
   *
   * Array keys are the names of the context variables and values are the
   * context definitions.
   *
   * @var \Drupal\Core\Annotation\ContextDefinition[]
   */
  public $context_definitions = [];

  /**
   * Defines the provided context_definitions of the action plugin.
   *
   * Array keys are the names of the context variables and values are the
   * context definitions.
   *
   * @var \Drupal\Core\Annotation\ContextDefinition[]
   */
  public $provides = [];

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
RulesAction::$category public property The category under which the action should be listed in the UI.
RulesAction::$configure_permission public property The permission required to access the configuration UI for this plugin.
RulesAction::$context_definitions public property An array of context definitions describing the context used by the plugin.
RulesAction::$id public property The plugin ID.
RulesAction::$label public property The human-readable name of the action plugin.
RulesAction::$provides public property Defines the provided context_definitions of the action plugin.