1. 8.3.x core/lib/Drupal/Core/Field/Annotation/FieldType.php FieldType
  2. 8.3.x core/modules/field/src/Plugin/migrate/process/FieldType.php FieldType
  3. 8.0.x core/lib/Drupal/Core/Field/Annotation/FieldType.php FieldType
  4. 8.0.x core/modules/field/src/Plugin/migrate/process/d6/FieldType.php FieldType
  5. 8.1.x core/modules/field/src/Plugin/migrate/process/FieldType.php FieldType
  6. 8.1.x core/lib/Drupal/Core/Field/Annotation/FieldType.php FieldType
  7. 8.2.x core/modules/field/src/Plugin/migrate/process/FieldType.php FieldType
  8. 8.2.x core/lib/Drupal/Core/Field/Annotation/FieldType.php FieldType
  9. 8.4.x core/modules/field/src/Plugin/migrate/process/FieldType.php FieldType
  10. 8.4.x core/lib/Drupal/Core/Field/Annotation/FieldType.php FieldType

Defines a FieldType annotation object.

Additional annotation keys for field types can be defined in hook_field_info_alter().

Hierarchy

Expanded class hierarchy of FieldType

Related topics

37 classes are annotated with FieldType
AutoIncrementingTestItem in core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php
Defines the 'field_method_invocation_order_test' entity field type.
BooleanItem in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php
Defines the 'boolean' entity field type.
CommentItem in core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php
Plugin implementation of the 'comment' field type.
CreatedItem in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/CreatedItem.php
Defines the 'created' entity field type.
DateRangeItem in core/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php
Plugin implementation of the 'daterange' field type.

... See full list

File

core/lib/Drupal/Core/Field/Annotation/FieldType.php, line 17

Namespace

Drupal\Core\Field\Annotation
View source
class FieldType extends DataType {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The name of the module providing the field type plugin.
   *
   * @var string
   */
  public $module;

  /**
   * The human-readable name of the field type.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $label;

  /**
   * A short human readable description for the field type.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $description;

  /**
   * The category under which the field type should be listed in the UI.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $category = '';

  /**
   * The plugin_id of the default widget for this field type.
   *
   * This widget must be available whenever the field type is available (i.e.
   * provided by the field type module, or by a module the field type module
   * depends on).
   *
   * @var string
   */
  public $default_widget;

  /**
   * The plugin_id of the default formatter for this field type.
   *
   * This formatter must be available whenever the field type is available (i.e.
   * provided by the field type module, or by a module the field type module
   * depends on).
   *
   * @var string
   */
  public $default_formatter;

  /**
   * A boolean stating that fields of this type cannot be created through the UI.
   *
   * @var bool
   */
  public $no_ui = FALSE;

  /**
   * {@inheritdoc}
   */
  public $list_class;

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
DataType::$constraints public property An array of validation constraints for this type.
DataType::$definition_class public property The definition class to use for defining data of this type. Must implement the \Drupal\Core\TypedData\DataDefinitionInterface.
DataType::$list_definition_class public property The definition class to use for defining a list of items of this type. Must implement the \Drupal\Core\TypedData\ListDataDefinitionInterface.
DataType::$primitive_type public property The pre-defined primitive type that this data type maps to.
DataType::$unwrap_for_canonical_representation public property Whether the typed object wraps the canonical representation of the data.
FieldType::$category public property The category under which the field type should be listed in the UI.
FieldType::$default_formatter public property The plugin_id of the default formatter for this field type.
FieldType::$default_widget public property The plugin_id of the default widget for this field type.
FieldType::$description public property A short human readable description for the field type. Overrides DataType::$description
FieldType::$id public property The plugin ID. Overrides DataType::$id
FieldType::$label public property The human-readable name of the field type. Overrides DataType::$label
FieldType::$list_class public property The typed data class used for wrapping multiple data items of the type. Must implement the \Drupal\Core\TypedData\ListInterface. Overrides DataType::$list_class
FieldType::$module public property The name of the module providing the field type plugin.
FieldType::$no_ui public property A boolean stating that fields of this type cannot be created through the UI.
Plugin::$definition protected property The plugin definition read from the class annotation.
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object.