function EntityField::submitGroupByForm

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

Perform any necessary changes to the form values prior to storage.

There is no need for this function to actually store the data.

Parameters

array $form: An alterable, associative array containing the structure of the form, passed by reference.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides HandlerBase::submitGroupByForm

File

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

Class

EntityField
A field that displays entity field data.

Namespace

Drupal\views\Plugin\views\field

Code

public function submitGroupByForm(&$form, FormStateInterface $form_state) {
  parent::submitGroupByForm($form, $form_state);
  $item =& $form_state->get('handler')->options;
  // Add settings for "field API" fields.
  $item['group_column'] = $form_state->getValue([
    'options',
    'group_column',
  ]);
  $item['group_columns'] = array_filter($form_state->getValue([
    'options',
    'group_columns',
  ]));
}

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