You are here

public function EntityReferenceHierarchyAutocomplete::settingsSummary in Entity Reference Hierarchy 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/Field/FieldWidget/EntityReferenceHierarchyAutocomplete.php \Drupal\entity_hierarchy\Plugin\Field\FieldWidget\EntityReferenceHierarchyAutocomplete::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 EntityReferenceAutocompleteWidget::settingsSummary

File

src/Plugin/Field/FieldWidget/EntityReferenceHierarchyAutocomplete.php, line 62

Class

EntityReferenceHierarchyAutocomplete
Widget that uses autocomplete.

Namespace

Drupal\entity_hierarchy\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  if ($this
    ->getSetting(self::HIDE_WEIGHT)) {
    $summary[] = $this
      ->t('Weight field is hidden');
  }
  return $summary;
}