Defines a FieldFormatter annotation object.
Formatters handle the display of field values. Formatter hooks are typically called by the Field Attach API field_attach_prepare_view() and field_attach_view() functions.
Additional annotation keys for formatters can be defined in hook_field_formatter_info_alter().
Expanded class hierarchy of FieldFormatter
\Drupal\field\Plugin\Type\Formatter\FormatterPluginManager
\Drupal\field\Plugin\Type\Formatter\FormatterInterface
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldFormatter:: |
public | property | The name of the field formatter class. | |
FieldFormatter:: |
public | property | A short description of the formatter type. | |
FieldFormatter:: |
public | property | An array of field types the formatter supports. | |
FieldFormatter:: |
public | property | The plugin ID. | |
FieldFormatter:: |
public | property | The human-readable name of the formatter type. | |
FieldFormatter:: |
public | property | The name of the module providing the formatter. | |
FieldFormatter:: |
public | property | An array whose keys are the names of the settings available to the formatter type, and whose values are the default values for those settings. | |
Plugin:: |
protected | property | The plugin definiton read from the class annotation. | |
Plugin:: |
public | function |
Implements Drupal\Core\Annotation\AnnotationInterface::get(). Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function | Constructs a Plugin object. |