public function TestTextColorBehavior::settingsSummary

Returns a short summary for the current behavior settings.

Parameters

\Drupal\paragraphs\Entity\Paragraph $paragraph: The paragraph.

Return value

string[] The plugin settings.

Overrides ParagraphsBehaviorBase::settingsSummary

File

paragraphs/tests/modules/paragraphs_test/src/Plugin/paragraphs/Behavior/TestTextColorBehavior.php, line 98

Class

TestTextColorBehavior
Provides a test feature plugin.

Namespace

Drupal\paragraphs_test\Plugin\paragraphs\Behavior

Code

public function settingsSummary(Paragraph $paragraph) {
  $text_color = $paragraph
    ->getBehaviorSetting($this->pluginId, 'text_color');
  return [
    [
      'label' => $this
        ->t('Text color'),
      'value' => $text_color,
    ],
  ];
}