You are here

function references_dialog_plugin_display::execute in References dialog 7

When used externally, this is how a view gets run and returns data in the format required.

The base class cannot be executed.

Overrides views_plugin_display::execute

File

views/references_dialog_plugin_display.inc, line 177
Contains the default display plugin.

Class

references_dialog_plugin_display
A plugin to handle defaults on a view.

Code

function execute() {

  // Let the world know that this is the page view we're using.
  views_set_page_view($this->view);

  // Prior to this being called, the $view should already be set to this
  // display, and arguments should be set on the view.
  $this->view
    ->build();
  if (!empty($this->view->build_info['fail'])) {
    return drupal_not_found();
  }
  $this->view
    ->get_breadcrumb(TRUE);

  // And the title, which is much easier.
  drupal_set_title(filter_xss_admin($this->view
    ->get_title()), PASS_THROUGH);
  $content = $this->view
    ->render();
  return $content;
}