class FieldType

Defines a FieldType annotation object.

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

Hierarchy

Related topics

Annotations
Annotations for class discovery and metadata description.
Field Types API
Defines field, widget, display formatter, and storage types.

File

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

Namespace

Drupal\Core\Field\Annotation

Members

Name 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.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!Annotation!FieldType.php/class/FieldType/8.1.x