public function ProfileFormWidget::settingsSummary in Profile 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/ ProfileFormWidget.php, line 123 
Class
- ProfileFormWidget
- Plugin implementation of the 'profile_form' widget.
Namespace
Drupal\profile\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
  $form_modes = $this->entityDisplayRepository
    ->getFormModeOptions($this
    ->getFieldSetting('target_type'));
  $form_mode = $this
    ->getSetting('form_mode');
  $form_mode = isset($form_modes[$form_mode]) ? $form_modes[$form_mode] : $form_mode;
  $summary = [];
  $summary[] = $this
    ->t('Form mode: @mode', [
    '@mode' => $form_mode,
  ]);
  return $summary;
}