function Entity::submitOptionsForm
Same name in this branch
- 10 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::submitOptionsForm()
Same name in other branches
- 9 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::submitOptionsForm()
- 9 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::submitOptionsForm()
- 8.9.x core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::submitOptionsForm()
- 8.9.x core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::submitOptionsForm()
- 11.x core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::submitOptionsForm()
- 11.x core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::submitOptionsForm()
Overrides ArgumentValidatorPluginBase::submitOptionsForm
1 method overrides Entity::submitOptionsForm()
- User::submitOptionsForm in core/
modules/ user/ src/ Plugin/ views/ argument_validator/ User.php - Provides the default form for submitting options.
File
-
core/
modules/ views/ src/ Plugin/ views/ argument_validator/ Entity.php, line 160
Class
- Entity
- Defines an argument validator plugin for each entity type.
Namespace
Drupal\views\Plugin\views\argument_validatorCode
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'] = [];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.