FieldWidget attribute
1 unresolved thread
1 unresolved thread
Closes #3420978
Merge request reports
Activity
1 <?php 2 3 namespace Drupal\Core\Field\Attribute; 4 5 use Drupal\Component\Plugin\Attribute\Plugin; 6 use Drupal\Core\StringTranslation\TranslatableMarkup; 7 8 /** 9 * Defines a FieldWidget attribute for plugin discovery. 10 * 11 * Plugin Namespace: Plugin\Field\FieldWidget 12 * 13 * Widgets handle how fields are displayed in edit forms. 14 * 15 * Additional annotation keys for widgets can be defined in 16 * hook_field_widget_info_alter(). Had a look in core, there are 3 modules that implement
hook_field_widget_info_alter
, all of them just add to thefield_types
key. We also have coverage for this inWidgetPluginManagerTest
. I also looked in contrib and there are hundreds of modules implementing this hook, but the ones I looked at all just add tofield_types
. Regardless, since the attribute gets converted to an array, I don't think we're breaking anything here. It's mostly just the wording "annotation keys" that's bothering me.
- Resolved by Michael Strelan
- Resolved by Michael Strelan
- Resolved by Michael Strelan
Please register or sign in to reply