The field_widget @defgroup in the documentation https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php... says, " A widget is a plugin annotated with class \Drupal\Core\Entity\Annotation\FieldWidget that ..." however, there is no such thing as \Drupal\Core\Entity\Annotation\FieldWidget and this should instead be \Drupal\Core\Field\Annotation\FieldWidget.
This is a simple change to the docblock associated with hook_field_widget_info_alter() in field.api.php. Changing this should also ensure that the class is linked on api.drupal.org.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2308707-5-field_api_php_documentation_cleanup.patch | 1.7 KB | eojthebrave |
eojthebrave-field-widget-defgroup.patch | 720 bytes | eojthebrave | |
Comments
Comment #1
jhodgdonLooks good, thanks!
Comment #2
jhodgdonThanks again! Committed to 8.x.
Comment #4
jhodgdonActually, the Field and Field Formatter topics in the same file have the same problem -- looks like all the field annotation classes were moved from Entity to Field. Want to make a patch to fix the other references?
Comment #5
eojthebraveSure thing. Looks like there where 3 other bad references in the docblocks in field.api.php. Here's a patch to fix them.
Comment #6
jhodgdonExcellent, thanks! I happened to notice this issue yesterday, must have been around the same time as you filed this issue (and I was busy and didn't file the issue, so it made me laugh when I found yours!). But I had noticed all three of these pages... so glad to see them all fixed!
This looks good.
Comment #7
Dries CreditAttribution: Dries commentedCommitted! Thank you.