public function MobileNumberInternationalFormatter::settingsSummary in Mobile Number 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Field/FieldFormatter/MobileNumberInternationalFormatter.php \Drupal\mobile_number\Plugin\Field\FieldFormatter\MobileNumberInternationalFormatter::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 FormatterBase::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ MobileNumberInternationalFormatter.php, line 51
Class
- MobileNumberInternationalFormatter
- Plugin implementation of the 'mobile_number_international' formatter.
Namespace
Drupal\mobile_number\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
$settings = $this
->getSettings() + static::defaultSettings();
if (!empty($settings['as_link'])) {
$summary[] = t('Show as TEL link');
}
else {
$summary[] = t('Show as plaintext');
}
return $summary;
}