public function FocalPointImageWidget::settingsSummary in Focal Point 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 ImageWidget::settingsSummary
File
- src/
Plugin/ Field/ FieldWidget/ FocalPointImageWidget.php, line 82
Class
- FocalPointImageWidget
- Plugin implementation of the 'image_focal_point' widget.
Namespace
Drupal\focal_point\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$status = $this
->getSetting('preview_link') ? $this
->t('Yes') : $this
->t('No');
$summary[] = $this
->t('Preview link: @status', [
'@status' => $status,
]);
$offsets = $this
->getSetting('offsets');
$summary[] = $this
->t('Default focal point: @offsets', [
'@offsets' => $offsets,
]);
return $summary;
}