function EntityField::submitFormCalculateOptions

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::submitFormCalculateOptions()
  2. 8.9.x core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::submitFormCalculateOptions()
  3. 11.x core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::submitFormCalculateOptions()

Overrides HandlerBase::submitFormCalculateOptions

File

core/modules/views/src/Plugin/views/field/EntityField.php, line 550

Class

EntityField
A field that displays entity field data.

Namespace

Drupal\views\Plugin\views\field

Code

public function submitFormCalculateOptions(array $options, array $form_state_options) {
    // When we change the formatter type we don't want to keep any of the
    // previous configured formatter settings, as there might be schema
    // conflict.
    unset($options['settings']);
    $options = $form_state_options + $options;
    if (!isset($options['settings'])) {
        $options['settings'] = [];
    }
    return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.