You are here

public function Entity::submitOptionsForm in Drupal 10

Same name in this branch
  1. 10 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::submitOptionsForm()
  2. 10 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::submitOptionsForm()
Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::submitOptionsForm()
  2. 9 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::submitOptionsForm()
1 method overrides Entity::submitOptionsForm()
User::submitOptionsForm in core/modules/user/src/Plugin/views/argument_validator/User.php

File

core/modules/views/src/Plugin/views/argument_validator/Entity.php, line 161

Class

Entity
Defines an argument validator plugin for each entity type.

Namespace

Drupal\views\Plugin\views\argument_validator

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = []) {

  // Filter out unused options so we don't store giant unnecessary arrays.
  // Note that the bundles form option doesn't appear on the form if the
  // entity type doesn't support bundles, so the option may not be set.
  if (!empty($options['bundles'])) {
    $options['bundles'] = array_filter($options['bundles']);
  }
  else {

    // Set bundles back to its default empty value.
    $options['bundles'] = [];
  }
}