public function ChartConfigItemDefaultWidget::settingsSummary in Charts 8.4
Same name and namespace in other branches
- 5.0.x src/Plugin/Field/FieldWidget/ChartConfigItemDefaultWidget.php \Drupal\charts\Plugin\Field\FieldWidget\ChartConfigItemDefaultWidget::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
- src/
Plugin/ Field/ FieldWidget/ ChartConfigItemDefaultWidget.php, line 97
Class
- ChartConfigItemDefaultWidget
- Plugin implementation of the 'chart_config_default' widget.
Namespace
Drupal\charts\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$change_default_library = $this
->getSetting('change_default_library');
if (empty($change_default_library)) {
$summary[] = $this
->t('User is not allowed to change/set the default charting library');
}
else {
$summary[] = $this
->t('User is allowed to change/set the charting library');
}
return $summary;
}