public function EntityReferenceTreeWidget::settingsSummary in Entity Reference Tree Widget 8
Same name and namespace in other branches
- 2.x src/Plugin/Field/FieldWidget/EntityReferenceTreeWidget.php \Drupal\entity_reference_tree\Plugin\Field\FieldWidget\EntityReferenceTreeWidget::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 EntityReferenceAutocompleteWidget::settingsSummary
File
- src/
Plugin/ Field/ FieldWidget/ EntityReferenceTreeWidget.php, line 160
Class
- EntityReferenceTreeWidget
- A entity reference tree widget.
Namespace
Drupal\entity_reference_tree\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
// JsTree theme.
$summary[] = t('JsTree theme: @theme', array(
'@theme' => $this
->getSetting('theme'),
));
// Button label.
if ($label = $this
->getSetting('label')) {
$summary[] = t('Button label: @label', [
'@label' => $label,
]);
}
return $summary;
}