Defines a FieldFormatter annotation object.
Formatters handle the display of field values. They are typically instantiated and invoked by an EntityDisplay object.
Additional annotation keys for formatters can be defined in hook_field_formatter_info_alter().
\Drupal\Core\Field\FormatterPluginManager
\Drupal\Core\Field\FormatterInterface
Name | Modifiers | Type | Description |
---|---|---|---|
FieldFormatter::$class | public | property | The name of the field formatter class. |
FieldFormatter::$description | public | property | A short description of the formatter type. |
FieldFormatter::$field_types | public | property | An array of field types the formatter supports. |
FieldFormatter::$id | public | property | The plugin ID. |
FieldFormatter::$label | public | property | The human-readable name of the formatter type. |
FieldFormatter::$weight | public | property | An integer to determine the weight of this formatter relative to other formatter in the Field UI when selecting a formatter for a given field instance. |
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!FieldFormatter.php/class/FieldFormatter/8.1.x