class Action

Defines an Action annotation object.

Plugin Namespace: Plugin\Action

Hierarchy

Expanded class hierarchy of Action

See also

\Drupal\Core\Action\ActionInterface

\Drupal\Core\Action\ActionManager

\Drupal\Core\Action\ActionBase

\Drupal\Core\Action\Plugin\Action\UnpublishAction

Plugin API

Related topics

26 string references to 'Action'
BulkForm::defineOptions in core/modules/views/src/Plugin/views/field/BulkForm.php
Information about options for all kinds of purposes will be held here.
BulkForm::viewsFormValidate in core/modules/views/src/Plugin/views/field/BulkForm.php
BulkForm::__construct in core/modules/views/src/Plugin/views/field/BulkForm.php
Constructs a new BulkForm object.
BulkFormTest::testBulkForm in core/modules/views/tests/src/Functional/BulkFormTest.php
Tests the bulk form.
BulkFormTest::testConfirmRouteWithParameters in core/modules/views/tests/src/Functional/BulkFormTest.php
Tests that route parameters are passed to the confirmation form route.

... See full list

File

core/lib/Drupal/Core/Annotation/Action.php, line 20

Namespace

Drupal\Core\Annotation
View source
class Action 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 route name for a confirmation form for this action.
   *
   * This property is optional and it does not need to be declared.
   *
   * @var string
   *
   * @todo Provide a more generic way to allow an action to be confirmed first.
   */
  public $confirm_form_route_name = '';
  
  /**
   * The entity type the action can apply to.
   *
   * @var string
   *
   * @todo Replace with \Drupal\Core\Plugin\Context\Context.
   */
  public $type = '';
  
  /**
   * The category under which the action should be listed in the UI.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $category;

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Action::$category public property The category under which the action should be listed in the UI.
Action::$confirm_form_route_name public property The route name for a confirmation form for this action.
Action::$id public property The plugin ID.
Action::$label public property The human-readable name of the action plugin.
Action::$type public property The entity type the action can apply to.
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 6
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass 1
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 1
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass 1
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. 3

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.