1 views_plugin_display_block.inc views_plugin_display_block::execute()

The display block handler returns the structure necessary for a block.

Overrides views_plugin_display::execute

File

core/modules/views/plugins/views_plugin_display_block.inc, line 114
Contains the block display plugin.

Class

views_plugin_display_block
The plugin that handles a block.

Code

function execute() {
  $output = NULL;
  // Prior to this being called, the $view should already be set to this
  // display, and arguments should be set on the view.
  $rendered_view = $this->view->render();
  if (!empty($this->view->result) || $this->get_option('empty') || !empty($this->view->style_plugin->definition['even empty'])) {
    $output = array(
      'content' => $rendered_view,
      'subject' => filter_xss_admin($this->view->get_title()),
    );
  }
  return $output;
}