Problem/Motivation
ExtraFieldSource has been added recently: #3571038: Render extra field values
And have an expected usage of $metadata attribute:
#[Source(
id: 'extra_field',
label: new TranslatableMarkup('Extra field'),
...
metadata: ['group' => new TranslatableMarkup('Fields')],
)]As already warned in https://www.drupal.org/project/display_builder/issues/3571038#comment-16...
metadataattribute, used inExtraFieldSource, is an undocumented feature of UI Patterns we will try to remove soon (see #3591167: Tidy metadata plugin attributes).
Proposed resolution
Remove current usage of $metadata attribute to avoid fatal errors once we limit its usage, both in plugin definition and in BlockLibrarySourceHelper.
Follow-up
If Display Builder really need to group sources in a clean way, and remove the hacky BlockLibrarySourceHelper::getSourceGroupLabel(), We can propose UI Patterns project to add a category or group attribute to Source plugins and make SourcePluginManager implements CategorizingPluginManagerInterface.
Issue fork display_builder-3608406
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pdureau commentedpipeline running
Comment #4
pdureau commentedComment #7
mogtofu33 commented