public function TestBoldTextBehavior::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/TestBoldTextBehavior.php, line 62

Class

TestBoldTextBehavior
Provides a test feature plugin.

Namespace

Drupal\paragraphs_test\Plugin\paragraphs\Behavior

Code

public function settingsSummary(Paragraph $paragraph) {
  $bold_setting = $paragraph
    ->getBehaviorSetting($this
    ->getPluginId(), 'bold_text');
  return [
    [
      'label' => $this
        ->t('Bold'),
      'value' => $bold_setting ? $this
        ->t('Yes') : $this
        ->t('No'),
    ],
  ];
}