You are here

public function FormatterWidget::settingsFormAjax in Formatter Field 8

Ajax handler for settings form.

File

src/Plugin/Field/FieldWidget/FormatterWidget.php, line 178

Class

FormatterWidget
Defines the 'formatter' field widget.

Namespace

Drupal\formatter_field\Plugin\Field\FieldWidget

Code

public function settingsFormAjax($form, FormStateInterface $form_state) {
  $parent_element = $form['#form_id'] == 'field_config_edit_form' ? 'default_value' : $this->fieldDefinition
    ->getName();
  return $form[$parent_element]['widget']['container']['settings'];
}