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

  1. Add method to our own PluginSettingsInterface
  2. Implement this method in SourcePluginBase: if $form['value'] is the only settings (SourcePluginPropValueWidget?) and is scalar, print it.
  3. 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

Command icon 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

pdureau created an issue. See original summary.

pdureau’s picture

Issue summary: View changes
pdureau’s picture

Issue summary: View changes

pdureau’s picture

Assigned: pdureau » Unassigned
Status: Active » Needs review
pdureau’s picture

Assigned: Unassigned » pdureau
Status: Needs review » Needs work

From Christian: it should be an array

pdureau’s picture

Assigned: pdureau » christian.wiedemann
Status: Needs work » Needs review

Better like that?

pdureau’s picture

Title: [2.0.x] Add PluginSettingsInterface::settingsSummary() » [2.0.4] Add PluginSettingsInterface::settingsSummary()
christian.wiedemann’s picture

I 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

christian.wiedemann’s picture

Status: Needs review » Reviewed & tested by the community
pdureau’s picture

Assigned: christian.wiedemann » Unassigned
Status: Reviewed & tested by the community » Needs work

ok, i change a little thing and i merge

pdureau’s picture

Assigned: Unassigned » pdureau

  • pdureau committed 731969da on 2.0.x
    Issue #3519282 by pdureau, christian.wiedemann: Add...
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Fixed
pdureau’s picture

Status: Fixed » Closed (fixed)
christian.wiedemann’s picture