Action.php

Same filename in this branch
  1. 11.x core/modules/system/src/Entity/Action.php
  2. 11.x core/modules/system/src/Plugin/migrate/source/Action.php
  3. 11.x core/lib/Drupal/Core/Action/Attribute/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. 10 core/modules/system/src/Entity/Action.php
  9. 10 core/modules/system/src/Plugin/migrate/source/Action.php
  10. 10 core/lib/Drupal/Core/Action/Attribute/Action.php
  11. 10 core/lib/Drupal/Core/Annotation/Action.php

Namespace

Drupal\Core\Annotation

File

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

View source
<?php

namespace Drupal\Core\Annotation;

use Drupal\Component\Annotation\Plugin;

/**
 * Defines an Action annotation 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
 *
 * @Annotation
 */
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;

}

Classes

Title Deprecated Summary
Action Defines an Action annotation object.

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