Make it works for all widgets inherited from \Drupal\link\Plugin\Field\FieldWidget\LinkWidget (including custom ones)

Created on 8 May 2023, over 1 year ago
Updated 8 July 2023, over 1 year ago

Problem/Motivation

I've found that the list of widget plugins where 'link_field_autocomplete_filter' is working is hardcoded (see 'link_field_autocomplete_filter_field_widget_form_alter()' hook implementation). As improvements, we can use the following changes applied in the patch.

Steps to reproduce

Create and use another custom widget plugin inherited from \Drupal\link\Plugin\Field\FieldWidget\LinkWidget.

Proposed resolution

We may allow the usage of link_field_autocomplete_filter not by a list of plugin ids but by the instance class name of the widget.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024