3 namespace Drupal\Core\Field\Annotation;
5 use Drupal\Core\TypedData\Annotation\DataType;
8 * Defines a FieldType annotation object.
10 * Additional annotation keys for field types can be defined in
11 * hook_field_info_alter().
13 * @ingroup field_types
17 class FieldType extends DataType {
27 * The name of the module providing the field type plugin.
34 * The human-readable name of the field type.
36 * @ingroup plugin_translatable
38 * @var \Drupal\Core\Annotation\Translation
43 * A short human readable description for the field type.
45 * @ingroup plugin_translatable
47 * @var \Drupal\Core\Annotation\Translation
52 * The category under which the field type should be listed in the UI.
54 * @ingroup plugin_translatable
56 * @var \Drupal\Core\Annotation\Translation
58 public $category = '';
61 * The plugin_id of the default widget for this field type.
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
69 public $default_widget;
72 * The plugin_id of the default formatter for this field type.
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
80 public $default_formatter;
83 * A boolean stating that fields of this type cannot be created through the UI.
87 public $no_ui = FALSE;
95 * An integer defining a fixed cardinality for this field type.
97 * If this value is not set, cardinality can be configured in the field UI.