Problem/Motivation
SourceInterface is extending PluginSettingsInterface which is heavily inspired from Core's PluginSettingsInterface
We initially didn't add a method inspired from FormatterInterface::settingsSummary() to this interface, because we didn't have usage at the time.
The upcoming https://www.drupal.org/project/display_builder needs it.
Proposed resolution
- Add method to our own PluginSettingsInterface
- Implement this method in SourcePluginBase: if
$form['value']is the only settings (SourcePluginPropValueWidget?) and is scalar, print it. - Implement this method in slots sources:
- BlockSource >> Selected block
- ComponentSource >> Variant name
- TokenSource >>
$form['value'](not the same as SourcePluginBase if we limit SourcePluginBase to SourcePluginPropValueWidget children) - WysiwygWidget >> The first characters (once tags are stripped) ?
- FieldFormatterSourceDeriver >> ???
- ViewFieldSource >> $form['ui_patterns_views_field']
- ViewRowsSource >> $form['ui_patterns_views_field']
User interface changes
No
API changes
Nothing breaking.
Data model changes
No
Issue fork ui_patterns-3519282
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 #2
pdureau commentedComment #3
pdureau commentedComment #5
pdureau commentedComment #6
pdureau commentedFrom Christian: it should be an array
Comment #7
pdureau commentedBetter like that?
Comment #8
pdureau commentedComment #9
christian.wiedemann commentedI am not sure how you use this in ds. But general the method returns an informativ text what is shown with label etc. But you can merge
Comment #10
christian.wiedemann commentedComment #11
pdureau commentedok, i change a little thing and i merge
Comment #12
pdureau commentedComment #14
pdureau commentedComment #15
pdureau commentedComment #16
christian.wiedemann commented