public function TestBoldTextBehavior::settingsSummary in Paragraphs 8
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
- 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\BehaviorCode
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'),
],
];
}