function WizardPluginBase::defaultDisplayFilters
Same name in other branches
- 9 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::defaultDisplayFilters()
- 10 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::defaultDisplayFilters()
- 11.x core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::defaultDisplayFilters()
Retrieves all filter information used by the default display.
Additional to the one provided by the plugin this method takes care about adding additional filters based on user input.
Parameters
array $form: The full wizard form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the wizard form.
Return value
array An array of filter arrays keyed by ID. A sort array contains the options accepted by a filter handler.
1 call to WizardPluginBase::defaultDisplayFilters()
- WizardPluginBase::buildDisplayOptions in core/
modules/ views/ src/ Plugin/ views/ wizard/ WizardPluginBase.php - Builds an array of display options for the view.
File
-
core/
modules/ views/ src/ Plugin/ views/ wizard/ WizardPluginBase.php, line 896
Class
- WizardPluginBase
- Base class for Views wizard plugins.
Namespace
Drupal\views\Plugin\views\wizardCode
protected function defaultDisplayFilters($form, FormStateInterface $form_state) {
$filters = [];
// Add any filters provided by the plugin.
foreach ($this->getFilters() as $name => $info) {
$filters[$name] = $info;
}
// Add any filters specified by the user when filling out the wizard.
$filters = array_merge($filters, $this->defaultDisplayFiltersUser($form, $form_state));
return $filters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.