public function TelephoneDefaultWidget::settingsSummary in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::settingsSummary()
Returns a short summary for the current widget settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings.
Return value
array A short summary of the widget settings.
Overrides WidgetBase::settingsSummary
File
- core/
modules/ telephone/ src/ Plugin/ Field/ FieldWidget/ TelephoneDefaultWidget.php, line 52 - Contains \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget.
Class
- TelephoneDefaultWidget
- Plugin implementation of the 'telephone_default' widget.
Namespace
Drupal\telephone\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = array();
$placeholder = $this
->getSetting('placeholder');
if (!empty($placeholder)) {
$summary[] = t('Placeholder: @placeholder', array(
'@placeholder' => $placeholder,
));
}
else {
$summary[] = t('No placeholder');
}
return $summary;
}