3 * Contains \Drupal\{{ module }}\Plugin\Field\FieldWidget\{{ class }}.
6 namespace Drupal\{{ module }}\Plugin\Field\FieldWidget;
8 use Drupal\Core\Field\WidgetBase;
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 WidgetBase {
24 * Move all logic relating to the {{ info.id }} widget into this class.
25 * For more information, see:
27 * https://www.drupal.org/node/1796000
28 * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21WidgetInterface.php/interface/WidgetInterface/8
29 * https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21WidgetBase.php/class/WidgetBase/8