class FieldFormatter

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().

Hierarchy

Expanded class hierarchy of FieldFormatter

See also

\Drupal\field\Plugin\Type\Formatter\FormatterPluginManager

\Drupal\field\Plugin\Type\Formatter\FormatterInterface

35 files declare their use of FieldFormatter
32 classes are annotated with FieldFormatter

File

drupal/core/modules/field/lib/Drupal/field/Annotation/FieldFormatter.php, line 27
Contains \Drupal\field\Annotation\FieldFormatter.

Namespace

Drupal\field\Annotation
View source

Members

Namesort descending Modifiers Type Description Overrides
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::$module public property The name of the module providing the formatter.
FieldFormatter::$settings 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::$definition protected property The plugin definiton read from the class annotation.
Plugin::get public function Implements Drupal\Core\Annotation\AnnotationInterface::get(). Overrides AnnotationInterface::get
Plugin::parse protected function Parses an annotation into its definition.
Plugin::__construct public function Constructs a Plugin object.