public function LinkClassFormatter::settingsSummary in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/src/Plugin/Field/FieldFormatter/LinkClassFormatter.php \Drupal\social_core\Plugin\Field\FieldFormatter\LinkClassFormatter::settingsSummary()
- 8.8 modules/social_features/social_core/src/Plugin/Field/FieldFormatter/LinkClassFormatter.php \Drupal\social_core\Plugin\Field\FieldFormatter\LinkClassFormatter::settingsSummary()
- 10.0.x modules/social_features/social_core/src/Plugin/Field/FieldFormatter/LinkClassFormatter.php \Drupal\social_core\Plugin\Field\FieldFormatter\LinkClassFormatter::settingsSummary()
- 10.1.x modules/social_features/social_core/src/Plugin/Field/FieldFormatter/LinkClassFormatter.php \Drupal\social_core\Plugin\Field\FieldFormatter\LinkClassFormatter::settingsSummary()
- 10.2.x modules/social_features/social_core/src/Plugin/Field/FieldFormatter/LinkClassFormatter.php \Drupal\social_core\Plugin\Field\FieldFormatter\LinkClassFormatter::settingsSummary()
Returns a short summary for the current formatter settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.
Return value
string[] A short summary of the formatter settings.
Overrides LinkFormatter::settingsSummary
File
- modules/
social_features/ social_core/ src/ Plugin/ Field/ FieldFormatter/ LinkClassFormatter.php, line 49
Class
- LinkClassFormatter
- Plugin implementation of the 'link' formatter.
Namespace
Drupal\social_core\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$settings = $this
->getSettings();
if (!empty($settings['class'])) {
$summary[] = t('Class(es) on button = "@classes"', [
'@classes' => $settings['class'],
]);
}
return $summary;
}