You are here

public function ParagraphsLockablePlugin::settingsSummary in Paragraphs Collection 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

src/Plugin/paragraphs/Behavior/ParagraphsLockablePlugin.php, line 126

Class

ParagraphsLockablePlugin
Provides a Paragraphs Lockable plugin.

Namespace

Drupal\paragraphs_collection\Plugin\paragraphs\Behavior

Code

public function settingsSummary(Paragraph $paragraph) {
  $locked = $paragraph
    ->getBehaviorSetting($this
    ->getPluginId(), 'locked');
  $summary = [
    [
      'value' => $this
        ->t('Locked'),
    ],
  ];
  return $locked ? $summary : [];
}