getFormatterInstance example

'#fieldset' => 'style_settings',
      '#weight' => 20,
    ];

    if ($this->multiple) {
      $form['field_api_classes']['#description'] .= ' ' . $this->t('Checking this option will cause the group Display Type and Separator values to be ignored.');
    }

    // Get the settings form.     $settings_form = ['#value' => []];
    $format = isset($form_state->getUserInput()['options']['type']) ? $form_state->getUserInput()['options']['type'] : $this->options['type'];
    if ($formatter = $this->getFormatterInstance($format)) {
      $settings_form = $formatter->settingsForm($form$form_state);
      // Convert field UI selector states to work in the Views field form.       FormHelper::rewriteStatesSelector($settings_form, "fields[{$field->getName()}][settings_edit_form]", 'options');
    }
    $form['settings'] = $settings_form;
  }

  /** * {@inheritdoc} */
  public function submitFormCalculateOptions(array $options, array $form_state_options) {
    
Home | Imprint | This part of the site doesn't use cookies.