Returns a short summary for the current behavior settings.
\Drupal\paragraphs\Entity\Paragraph $paragraph: The paragraph.
string[] The plugin settings.
Overrides ParagraphsBehaviorBase::settingsSummary
public function settingsSummary(Paragraph $paragraph) {
$style_options = $this->yamlStyleDiscovery
->getStyleOptions();
$summary = [];
if ($styles = $paragraph
->getBehaviorSetting($this
->getPluginId(), 'styles')) {
foreach ($styles as $group_id => $style) {
// Check if the style set in the Paragraph is enabled in the collection.
if (isset($style_options[$style]) && (!isset($this->configuration['groups'][$group_id]) || $style != $this->configuration['groups'][$group_id]['default'])) {
$summary[] = [
'label' => $this->yamlStyleDiscovery
->getGroupWidgetLabel($group_id),
'value' => $style_options[$style],
];
}
}
}
return $summary;
}