class Action

Same name in this branch
  1. main core/modules/system/src/Entity/Action.php \Drupal\system\Entity\Action
  2. main core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action
  3. main core/lib/Drupal/Core/Action/Attribute/Action.php \Drupal\Core\Action\Attribute\Action
Same name and namespace in other branches
  1. 11.x core/modules/system/src/Entity/Action.php \Drupal\system\Entity\Action
  2. 11.x core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action
  3. 11.x core/lib/Drupal/Core/Action/Attribute/Action.php \Drupal\Core\Action\Attribute\Action
  4. 11.x core/lib/Drupal/Core/Annotation/Action.php \Drupal\Core\Annotation\Action
  5. 10 core/modules/system/src/Entity/Action.php \Drupal\system\Entity\Action
  6. 10 core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action
  7. 10 core/lib/Drupal/Core/Action/Attribute/Action.php \Drupal\Core\Action\Attribute\Action
  8. 10 core/lib/Drupal/Core/Annotation/Action.php \Drupal\Core\Annotation\Action
  9. 9 core/modules/action/src/Plugin/migrate/source/Action.php \Drupal\action\Plugin\migrate\source\Action
  10. 9 core/modules/system/src/Entity/Action.php \Drupal\system\Entity\Action
  11. 9 core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action
  12. 9 core/lib/Drupal/Core/Annotation/Action.php \Drupal\Core\Annotation\Action
  13. 8.9.x core/modules/action/src/Plugin/migrate/source/Action.php \Drupal\action\Plugin\migrate\source\Action
  14. 8.9.x core/modules/system/src/Entity/Action.php \Drupal\system\Entity\Action
  15. 8.9.x core/lib/Drupal/Core/Annotation/Action.php \Drupal\Core\Annotation\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;

}

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