function DisplayPluginBase::viewExposedFormBlocks
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::viewExposedFormBlocks()
- 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::viewExposedFormBlocks()
- 11.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::viewExposedFormBlocks()
Overrides DisplayPluginInterface::viewExposedFormBlocks
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 2627
Class
- DisplayPluginBase
- Base class for views display plugins.
Namespace
Drupal\views\Plugin\views\displayCode
public function viewExposedFormBlocks() {
// Avoid interfering with the admin forms.
$route_name = \Drupal::routeMatch()->getRouteName();
if (strpos($route_name, 'views_ui.') === 0) {
return;
}
$this->view
->initHandlers();
if ($this->usesExposed() && $this->getOption('exposed_block')) {
/** @var \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginInterface $exposed_form */
$exposed_form = $this->getPlugin('exposed_form');
return $exposed_form->renderExposedForm(TRUE);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.