3 * Contains \Drupal\{{ module }}\Plugin\Field\FieldFormatter\{{ class }}.
6 namespace Drupal\{{ module }}\Plugin\Field\FieldFormatter;
8 use Drupal\Core\Field\FormatterBase;
12 * id = "{{ info.id }}",
13 * label = @Translation("{{ info.label }}"),
14 {% if info.description %}
15 * description = @Translation("{{ info.description }}"),
17 * field_types = {{ '{' }}"{{ info.field_types|join('", "') }}"{{ '}' }}
20 class {{ class }} extends FormatterBase {
24 * Move all logic relating to the {{ info.id }} formatter into this
25 * class. For more information, see:
27 * https://www.drupal.org/node/1805846
28 * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21FormatterInterface.php/interface/FormatterInterface/8
29 * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21FormatterBase.php/class/FormatterBase/8