public function VotingApiWidget::settingsSummary in Votingapi Widgets 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/ VotingApiWidget.php, line 148
Class
- VotingApiWidget
- Plugin implementation of the 'voting_api_widget' widget.
Namespace
Drupal\votingapi_widgets\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$summary[] = $this
->t('Show initial vote: @show_initial_vote', [
'@show_initial_vote' => $this
->getSetting('show_initial_vote') ? $this
->t('yes') : $this
->t('no'),
]);
return $summary;
}