public function HMSFormatter::settingsSummary in HMS Field 8
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 FormatterBase::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ HMSFormatter.php, line 93 - Contains \Drupal\hms_field\Plugin\Field\FieldFormatter\HMSFormatter.
Class
- HMSFormatter
- Plugin implementation of the 'hms_default_formatter' formatter.
Namespace
Drupal\hms_field\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = array();
$settings = $this
->getSettings();
$summary[] = t('Format: @format', array(
'@format' => $settings['format'],
));
$summary[] = t('Leading zero: @zero', array(
'@zero' => $settings['leading_zero'] ? t('On') : t('Off'),
));
return $summary;
}