8bf54cb585db9f28c57cd1039a4f29ed4eaef1bb
[yaffs-website] / web / core / lib / Drupal / Core / Field / Annotation / FieldType.php
1 <?php
2
3 namespace Drupal\Core\Field\Annotation;
4
5 use Drupal\Core\TypedData\Annotation\DataType;
6
7 /**
8  * Defines a FieldType annotation object.
9  *
10  * Additional annotation keys for field types can be defined in
11  * hook_field_info_alter().
12  *
13  * @ingroup field_types
14  *
15  * @Annotation
16  */
17 class FieldType extends DataType {
18
19   /**
20    * The plugin ID.
21    *
22    * @var string
23    */
24   public $id;
25
26   /**
27    * The name of the module providing the field type plugin.
28    *
29    * @var string
30    */
31   public $module;
32
33   /**
34    * The human-readable name of the field type.
35    *
36    * @ingroup plugin_translatable
37    *
38    * @var \Drupal\Core\Annotation\Translation
39    */
40   public $label;
41
42   /**
43    * A short human readable description for the field type.
44    *
45    * @ingroup plugin_translatable
46    *
47    * @var \Drupal\Core\Annotation\Translation
48    */
49   public $description;
50
51   /**
52    * The category under which the field type should be listed in the UI.
53    *
54    * @ingroup plugin_translatable
55    *
56    * @var \Drupal\Core\Annotation\Translation
57    */
58   public $category = '';
59
60   /**
61    * The plugin_id of the default widget for this field type.
62    *
63    * This widget must be available whenever the field type is available (i.e.
64    * provided by the field type module, or by a module the field type module
65    * depends on).
66    *
67    * @var string
68    */
69   public $default_widget;
70
71   /**
72    * The plugin_id of the default formatter for this field type.
73    *
74    * This formatter must be available whenever the field type is available (i.e.
75    * provided by the field type module, or by a module the field type module
76    * depends on).
77    *
78    * @var string
79    */
80   public $default_formatter;
81
82   /**
83    * A boolean stating that fields of this type cannot be created through the UI.
84    *
85    * @var bool
86    */
87   public $no_ui = FALSE;
88
89   /**
90    * {@inheritdoc}
91    */
92   public $list_class;
93
94   /**
95    * An integer defining a fixed cardinality for this field type.
96    *
97    * If this value is not set, cardinality can be configured in the field UI.
98    *
99    * @var int|null
100    */
101   public $cardinality;
102
103 }