Storage key of Paragraph behavior should not come from default configuration keys

Created on 28 May 2025, about 1 month ago

Problem/Motivation

When choosing the source of the Paragraph behavior value we can only see keys from defaultConfiguration method because of this code inside settingsForm:

foreach (array_keys($plugin->defaultConfiguration()) as $key) {
  $options[$plugin_label][$plugin_id . ':' . $key] = $key;
}

The problem with that is that behavior plugins are not specifying the key to store the data in.

Take the offical TestTextColorBehavior.php as example:

The key that was set in defaultConfiguration is called default_color whereas the actual key holding the value is called text_color.

Do you think it is the easiest way to provide a text field that allows the site administrator to specify the name of the key instead of having the select list?

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany yannickoo Berlin

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

Comments & Activities

Production build 0.71.5 2024