Returns a short summary for the current formatter settings.
If an empty result is returned, the formatter is assumed to have no configurable settings, and no UI will be provided to display a settings form.
array() A short summary of the formatter settings.
Overrides FormatterBase::settingsSummary
public function settingsSummary() {
$summary = array();
$settings = $this
->getSettings();
if (!empty($settings['trim_length'])) {
$summary[] = t('Link text trimmed to @limit characters', array(
'@limit' => $settings['trim_length'],
));
}
else {
$summary[] = t('Link text not trimmed');
}
if ($this
->getPluginId() == 'link' && !empty($settings['url_only'])) {
if (!empty($settings['url_plain'])) {
$summary[] = t('Show URL only as plain-text');
}
else {
$summary[] = t('Show URL only');
}
}
if (!empty($settings['rel'])) {
$summary[] = t('Add rel="@rel"', array(
'@rel' => $settings['rel'],
));
}
if (!empty($settings['target'])) {
$summary[] = t('Open link in new window');
}
return $summary;
}