comparison core/lib/Drupal/Core/Annotation/Action.php @ 0:4c8ae668cc8c

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