Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Field / Annotation / FieldWidget.php
1 <?php
2
3 namespace Drupal\Core\Field\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines a FieldWidget annotation object.
9  *
10  * Widgets handle how fields are displayed in edit forms.
11  *
12  * Additional annotation keys for widgets can be defined in
13  * hook_field_widget_info_alter().
14  *
15  * @Annotation
16  *
17  * @see \Drupal\Core\Field\WidgetPluginManager
18  * @see \Drupal\Core\Field\WidgetInterface
19  *
20  * @ingroup field_widget
21  */
22 class FieldWidget extends Plugin {
23
24   /**
25    * The plugin ID.
26    *
27    * @var string
28    */
29   public $id;
30
31   /**
32    * The human-readable name of the widget type.
33    *
34    * @ingroup plugin_translatable
35    *
36    * @var \Drupal\Core\Annotation\Translation
37    */
38   public $label;
39
40   /**
41    * A short description of the widget type.
42    *
43    * @ingroup plugin_translatable
44    *
45    * @var \Drupal\Core\Annotation\Translation
46    */
47   public $description;
48
49   /**
50    * The name of the widget class.
51    *
52    * This is not provided manually, it will be added by the discovery mechanism.
53    *
54    * @var string
55    */
56   public $class;
57
58   /**
59    * An array of field types the widget supports.
60    *
61    * @var array
62    */
63   public $field_types = [];
64
65   /**
66    * Does the field widget handles multiple values at once.
67    *
68    * @var bool
69    */
70   public $multiple_values = FALSE;
71
72   /**
73    * An integer to determine the weight of this widget relative to other widgets
74    * in the Field UI when selecting a widget for a given field.
75    *
76    * @var int optional
77    */
78   public $weight = NULL;
79
80 }