public function DisplayPluginBase::viewSpecialBlocks

Render any special blocks provided for this display.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 2689
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

public function viewSpecialBlocks($type) {
  if ($type == '-exp') {

    // avoid interfering with the admin forms.
    if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') {
      return;
    }
    $this->view
      ->initHandlers();
    if ($this
      ->usesExposed() && $this
      ->getOption('exposed_block')) {
      $exposed_form = $this
        ->getPlugin('exposed_form');
      return array(
        'content' => $exposed_form
          ->render_exposed_form(TRUE),
      );
    }
  }
}