Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/Annotation/Action.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Core\Annotation; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Component\Annotation\Plugin; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Defines an Action annotation object. |
Chris@0 | 9 * |
Chris@0 | 10 * Plugin Namespace: Plugin\Action |
Chris@0 | 11 * |
Chris@0 | 12 * For a working example, see \Drupal\node\Plugin\Action\UnpublishNode |
Chris@0 | 13 * |
Chris@0 | 14 * @see \Drupal\Core\Action\ActionInterface |
Chris@0 | 15 * @see \Drupal\Core\Action\ActionManager |
Chris@0 | 16 * @see \Drupal\Core\Action\ActionBase |
Chris@0 | 17 * @see plugin_api |
Chris@0 | 18 * |
Chris@0 | 19 * @Annotation |
Chris@0 | 20 */ |
Chris@0 | 21 class Action extends Plugin { |
Chris@0 | 22 |
Chris@0 | 23 /** |
Chris@0 | 24 * The plugin ID. |
Chris@0 | 25 * |
Chris@0 | 26 * @var string |
Chris@0 | 27 */ |
Chris@0 | 28 public $id; |
Chris@0 | 29 |
Chris@0 | 30 /** |
Chris@0 | 31 * The human-readable name of the action plugin. |
Chris@0 | 32 * |
Chris@0 | 33 * @ingroup plugin_translatable |
Chris@0 | 34 * |
Chris@0 | 35 * @var \Drupal\Core\Annotation\Translation |
Chris@0 | 36 */ |
Chris@0 | 37 public $label; |
Chris@0 | 38 |
Chris@0 | 39 /** |
Chris@0 | 40 * The route name for a confirmation form for this action. |
Chris@0 | 41 * |
Chris@0 | 42 * @todo Provide a more generic way to allow an action to be confirmed first. |
Chris@0 | 43 * |
Chris@0 | 44 * @var string (optional) |
Chris@0 | 45 */ |
Chris@0 | 46 public $confirm_form_route_name = ''; |
Chris@0 | 47 |
Chris@0 | 48 /** |
Chris@0 | 49 * The entity type the action can apply to. |
Chris@0 | 50 * |
Chris@0 | 51 * @todo Replace with \Drupal\Core\Plugin\Context\Context. |
Chris@0 | 52 * |
Chris@0 | 53 * @var string |
Chris@0 | 54 */ |
Chris@0 | 55 public $type = ''; |
Chris@0 | 56 |
Chris@0 | 57 /** |
Chris@0 | 58 * The category under which the action should be listed in the UI. |
Chris@0 | 59 * |
Chris@0 | 60 * @var \Drupal\Core\Annotation\Translation |
Chris@0 | 61 * |
Chris@0 | 62 * @ingroup plugin_translatable |
Chris@0 | 63 */ |
Chris@0 | 64 public $category; |
Chris@0 | 65 |
Chris@0 | 66 } |