public function MachineName::settingsSummary in Machine name 8
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
- src/
Plugin/ Field/ FieldWidget/ MachineName.php, line 74
Class
- MachineName
- Plugin annotation @FieldWidget( id = "machine_name", label = @Translation("Machine name"), field_types = { "machine_name" }, )
Namespace
Drupal\machine_name\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
if (!empty($this
->getSetting('editable'))) {
$summary[] = t('Editable: @editable', array(
'@editable' => $this
->getSetting('editable') ? 'yes' : 'no',
));
}
return $summary;
}