function CommentDefaultFormatter::settingsSummary
Same name in other branches
- 9 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentDefaultFormatter::settingsSummary()
- 8.9.x core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentDefaultFormatter::settingsSummary()
- 10 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentDefaultFormatter::settingsSummary()
Overrides FormatterBase::settingsSummary
File
-
core/
modules/ comment/ src/ Plugin/ Field/ FieldFormatter/ CommentDefaultFormatter.php, line 248
Class
- CommentDefaultFormatter
- Provides a default comment formatter.
Namespace
Drupal\comment\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$view_mode = $this->getSetting('view_mode');
$view_modes = $this->getViewModes();
$view_mode_label = $view_modes[$view_mode] ?? 'default';
$summary = [
$this->t('Comment view mode: @mode', [
'@mode' => $view_mode_label,
]),
];
if ($pager_id = $this->getSetting('pager_id')) {
$summary[] = $this->t('Pager ID: @id', [
'@id' => $pager_id,
]);
}
return $summary;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.