public function ParagraphsGridLayoutPlugin::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/ ParagraphsGridLayoutPlugin.php, line 241
Class
- ParagraphsGridLayoutPlugin
- Provides a way to define grid based layouts.
Namespace
Drupal\paragraphs_collection\Plugin\paragraphs\BehaviorCode
public function settingsSummary(Paragraph $paragraph) {
$summary = [];
$layouts = $this->gridLayoutDiscovery
->getGridLayouts();
if ($layout = $paragraph
->getBehaviorSetting($this
->getPluginId(), 'layout')) {
$summary = [
[
'label' => $this
->t('Layout'),
'value' => $layouts[$layout]['title'],
],
];
}
return $summary;
}