You are here

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

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

File

templates/Widget.html.twig
View source
  1. /**
  2. * @file
  3. * Contains \Drupal\{{ module }}\Plugin\Field\FieldWidget\{{ class }}.
  4. */
  5. namespace Drupal\{{ module }}\Plugin\Field\FieldWidget;
  6. use Drupal\Core\Field\WidgetBase;
  7. /**
  8. * @FieldWidget(
  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 WidgetBase {
  18. /**
  19. * @FIXME
  20. * Move all logic relating to the {{ info.id }} widget into this class.
  21. * For more information, see:
  22. *
  23. * https://www.drupal.org/node/1796000
  24. * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21WidgetInterface.php/interface/WidgetInterface/8
  25. * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21WidgetBase.php/class/WidgetBase/8
  26. */
  27. }