public function Table::wizardSubmit

Alter the options of a display before they are added to the view.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Drupal\views\Plugin\views\wizard\WizardInterface $wizard: The current used wizard.

array $display_options: The options which will be used on the view. The style plugin should alter this to its own needs.

string $display_type: The display type, either block or page.

Overrides StylePluginBase::wizardSubmit

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php, line 394
Definition of Drupal\views\Plugin\views\style\Table.

Class

Table
Style plugin to render each item as a row in a table.

Namespace

Drupal\views\Plugin\views\style

Code

public function wizardSubmit(&$form, &$form_state, WizardInterface $wizard, &$display_options, $display_type) {

  // If any of the displays use the table style, take sure that the fields
  // always have a labels by unsetting the override.
  foreach ($display_options['default']['fields'] as &$field) {
    unset($field['label']);
  }
}