public function CmisFieldWidget::settingsSummary in CMIS API 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/CmisFieldWidget.php \Drupal\cmis\Plugin\Field\FieldWidget\CmisFieldWidget::settingsSummary()
- 3.0.x src/Plugin/Field/FieldWidget/CmisFieldWidget.php \Drupal\cmis\Plugin\Field\FieldWidget\CmisFieldWidget::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/ CmisFieldWidget.php, line 74
Class
- CmisFieldWidget
- Plugin implementation of the 'cmis_field_widget' widget.
Namespace
Drupal\cmis\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
if (empty($this->cmis_configurations)) {
$this
->getConfigurations();
}
$summary = [];
$summary[] = t('Textfield size: !size', array(
'!size' => $this
->getSetting('size'),
));
if (!empty($this
->getSetting('placeholder'))) {
$summary[] = t('Placeholder: @placeholder', array(
'@placeholder' => $this
->getSetting('placeholder'),
));
}
$cmis_configuration = $this
->getSetting('cmis_configuration');
if (!empty($cmis_configuration)) {
$summary[] = t('CMIS configuration: @cmis_configuration', array(
'@cmis_configuration' => $this->cmis_configurations[$cmis_configuration],
));
}
return $summary;
}