You are here

Formatter.html.twig in Drupal 7 to 8/9 Module Upgrader 8

Contains \Drupal\{{ module }}\Plugin\Field\FieldFormatter\{{ class }}.

File

templates/Formatter.html.twig
View source
  1. /**
  2. * @file
  3. * Contains \Drupal\{{ module }}\Plugin\Field\FieldFormatter\{{ class }}.
  4. */
  5. namespace Drupal\{{ module }}\Plugin\Field\FieldFormatter;
  6. use Drupal\Core\Field\FormatterBase;
  7. /**
  8. * @FieldFormatter(
  9. * id = "{{ info.id }}",
  10. * label = @Translation("{{ info.label }}"),
  11. {% if info.description %}
  12. * description = @Translation("{{ info.description }}"),
  13. {% endif %}
  14. * field_types = {{ '{' }}"{{ info.field_types|join('", "') }}"{{ '}' }}
  15. * )
  16. */
  17. class {{ class }} extends FormatterBase {
  18. /**
  19. * @FIXME
  20. * Move all logic relating to the {{ info.id }} formatter into this
  21. * class. For more information, see:
  22. *
  23. * https://www.drupal.org/node/1805846
  24. * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21FormatterInterface.php/interface/FormatterInterface/8
  25. * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21FormatterBase.php/class/FormatterBase/8
  26. */
  27. }