You are here

protected function EntityViewDisplayEditForm::alterSettingsSummary in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php \Drupal\field_ui\Form\EntityViewDisplayEditForm::alterSettingsSummary()

Alters the widget or formatter settings summary.

Parameters

array $summary: The widget or formatter settings summary.

\Drupal\Core\Field\PluginSettingsInterface $plugin: The widget or formatter.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

Overrides EntityDisplayFormBase::alterSettingsSummary

File

core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php, line 187

Class

EntityViewDisplayEditForm
Edit form for the EntityViewDisplay entity type.

Namespace

Drupal\field_ui\Form

Code

protected function alterSettingsSummary(array &$summary, PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition) {
  $context = [
    'formatter' => $plugin,
    'field_definition' => $field_definition,
    'view_mode' => $this->entity
      ->getMode(),
  ];
  $this->moduleHandler
    ->alter('field_formatter_settings_summary', $summary, $context);
}