class Action

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

Defines an Action annotation object.

Plugin Namespace: Plugin\Action

Hierarchy

  • class \Drupal\Core\Annotation\Action extends \Drupal\Component\Annotation\Plugin

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

30 string references to 'Action'
action.routing.yml in core/modules/action/action.routing.yml
core/modules/action/action.routing.yml
ActionAdminManageForm::buildForm in core/modules/action/src/Form/ActionAdminManageForm.php
Form constructor.
ActionAdminManageForm::submitForm in core/modules/action/src/Form/ActionAdminManageForm.php
Form submission handler.
ActionFormBase::create in core/modules/action/src/Form/ActionFormBase.php
Instantiates a new instance of this class.
ActionListTest::testEmptyActionList in core/modules/action/tests/src/Functional/ActionListTest.php
Tests the behavior when there are no actions to list in the admin page.

... 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 Overrides AnnotationInterface::get 6
Plugin::getClass public function Overrides AnnotationInterface::getClass 1
Plugin::getId public function Overrides AnnotationInterface::getId
Plugin::getProvider public function Overrides AnnotationInterface::getProvider 1
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Overrides AnnotationInterface::setClass 1
Plugin::setProvider public function 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.