You are here

public function UIkitViewTable::wizardSubmit in UIkit Components 8

Same name and namespace in other branches
  1. 8.3 uikit_views/src/Plugin/views/style/UIkitViewTable.php \Drupal\uikit_views\Plugin\views\style\UIkitViewTable::wizardSubmit()
  2. 8.2 uikit_views/src/Plugin/views/style/UIkitViewTable.php \Drupal\uikit_views\Plugin\views\style\UIkitViewTable::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.

\Drupal\Core\Form\FormStateInterface $form_state: 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

uikit_views/src/Plugin/views/style/UIkitViewTable.php, line 458

Class

UIkitViewTable
Style plugin to render each item in a UIkit Table component.

Namespace

Drupal\uikit_views\Plugin\views\style

Code

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

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