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/Annotation/Action.php \Drupal\Core\Annotation\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 attribute 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

25 files declare their use of Action
ActionAjaxTest.php in core/modules/action/tests/action_form_ajax_test/src/Plugin/Action/ActionAjaxTest.php
ActionManager.php in core/lib/Drupal/Core/Action/ActionManager.php
AddRoleUser.php in core/modules/user/src/Plugin/Action/AddRoleUser.php
AssignOwnerNode.php in core/modules/node/src/Plugin/Action/AssignOwnerNode.php
BatchUserAction.php in core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php

... See full list

31 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/Action/Attribute/Action.php, line 19

Namespace

Drupal\Core\Action\Attribute
View source
class Action extends Plugin {
    
    /**
     * Constructs an Action attribute.
     *
     * @param string $id
     *   The plugin ID.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $label
     *   The label of the action.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $action_label
     *   (optional) A label that can be used by the action deriver.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $category
     *   (optional) The category under which the action should be listed in the
     *   UI.
     * @param class-string|null $deriver
     *   (optional) The deriver class.
     * @param string|null $confirm_form_route_name
     *   (optional) The route name for a confirmation form for this action.
     * @param string|null $type
     *   (optional) The entity type the action can apply to.
     */
    public function __construct(string $id, ?TranslatableMarkup $label = NULL, ?TranslatableMarkup $action_label = NULL, ?TranslatableMarkup $category = NULL, ?string $deriver = NULL, ?string $confirm_form_route_name = NULL, ?string $type = NULL) {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Action::__construct public function Constructs an Action attribute. Overrides Plugin::__construct
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::get public function Gets the value of an attribute. Overrides AttributeInterface::get 6
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider

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