1. 8.5.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  2. 8.5.x core/lib/Drupal/Core/Annotation/Action.php Action
  3. 8.5.x core/modules/system/src/Entity/Action.php Action
  4. 8.0.x core/lib/Drupal/Core/Annotation/Action.php Action
  5. 8.0.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  6. 8.0.x core/modules/system/src/Entity/Action.php Action
  7. 8.1.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  8. 8.1.x core/modules/system/src/Entity/Action.php Action
  9. 8.1.x core/lib/Drupal/Core/Annotation/Action.php Action
  10. 8.2.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  11. 8.2.x core/modules/system/src/Entity/Action.php Action
  12. 8.2.x core/lib/Drupal/Core/Annotation/Action.php Action
  13. 8.3.x core/modules/system/src/Entity/Action.php Action
  14. 8.3.x core/lib/Drupal/Core/Annotation/Action.php Action
  15. 8.3.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  16. 8.4.x core/lib/Drupal/Core/Annotation/Action.php Action
  17. 8.4.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  18. 8.4.x core/modules/system/src/Entity/Action.php Action
  19. 8.6.x core/modules/action/src/Plugin/migrate/source/Action.php Action
  20. 8.6.x core/lib/Drupal/Core/Annotation/Action.php Action
  21. 8.6.x core/modules/system/src/Entity/Action.php Action

Defines an Action annotation object.

Plugin Namespace: Plugin\Action

For a working example, see \Drupal\node\Plugin\Action\UnpublishNode


Expanded class hierarchy of Action

See also




Plugin API

Related topics

5 string references to 'Action'
ActionAdminManageForm::buildForm in core/modules/action/src/Form/ActionAdminManageForm.php
Form constructor.
BulkForm::defineOptions in core/modules/system/src/Plugin/views/field/BulkForm.php
Information about options for all kinds of purposes will be held here.
BulkFormTest::testBulkForm in core/modules/action/tests/src/Functional/BulkFormTest.php
Tests the bulk form.
CommentAdminOverview::buildForm in core/modules/comment/src/Form/CommentAdminOverview.php
Form constructor for the comment overview administration form.
core.data_types.schema.yml in core/config/schema/core.data_types.schema.yml
24 classes are annotated with Action
AddRoleUser in core/modules/user/src/Plugin/Action/AddRoleUser.php
Adds a role to a user.
AssignOwnerNode in core/modules/node/src/Plugin/Action/AssignOwnerNode.php
Assigns ownership of a node to a user.
BlockUser in core/modules/user/src/Plugin/Action/BlockUser.php
Blocks a user.
CancelUser in core/modules/user/src/Plugin/Action/CancelUser.php
Cancels a user account.
DeleteNode in core/modules/node/src/Plugin/Action/DeleteNode.php
Redirects to a node deletion form.

... See full list


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


View source
class Action extends Plugin {

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

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

   * The route name for a confirmation form for this action.
   * @todo Provide a more generic way to allow an action to be confirmed first.
   * @var string (optional)
  public $confirm_form_route_name = '';

   * The entity type the action can apply to.
   * @todo Replace with \Drupal\Core\Plugin\Context\Context.
   * @var string
  public $type = '';

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



Contains filters are case sensitive
Namesort descending Modifiers Type Description 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.
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get
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.