Action.php

Same filename in this branch
  1. 10 core/modules/system/src/Entity/Action.php
  2. 10 core/modules/system/src/Plugin/migrate/source/Action.php
  3. 10 core/lib/Drupal/Core/Annotation/Action.php
Same filename in other branches
  1. 9 core/modules/action/src/Plugin/migrate/source/Action.php
  2. 9 core/modules/system/src/Entity/Action.php
  3. 9 core/modules/system/src/Plugin/migrate/source/Action.php
  4. 9 core/lib/Drupal/Core/Annotation/Action.php
  5. 8.9.x core/modules/action/src/Plugin/migrate/source/Action.php
  6. 8.9.x core/modules/system/src/Entity/Action.php
  7. 8.9.x core/lib/Drupal/Core/Annotation/Action.php
  8. 11.x core/modules/system/src/Entity/Action.php
  9. 11.x core/modules/system/src/Plugin/migrate/source/Action.php
  10. 11.x core/lib/Drupal/Core/Action/Attribute/Action.php
  11. 11.x core/lib/Drupal/Core/Annotation/Action.php

Namespace

Drupal\Core\Action\Attribute

File

core/lib/Drupal/Core/Action/Attribute/Action.php

View source
<?php

namespace Drupal\Core\Action\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Defines an Action attribute object.
 *
 * Plugin Namespace: Plugin\Action
 *
 * @see \Drupal\Core\Action\ActionInterface
 * @see \Drupal\Core\Action\ActionManager
 * @see \Drupal\Core\Action\ActionBase
 * @see \Drupal\Core\Action\Plugin\Action\UnpublishAction
 * @see plugin_api
 */
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) {
    }

}

Classes

Title Deprecated Summary
Action Defines an Action attribute object.

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