4 * Contains the default display plugin.
8 * A plugin to handle defaults on a view.
10 * @ingroup views_display_plugins
12 class views_plugin_display_default
extends views_plugin_display
{
14 * Determine if this display is the 'default' display which contains
17 function is_default_display() { return TRUE
; }
20 * The default execute handler fully renders the view.
22 * For the simplest use:
24 * $output = $view->execute_display('default', $args);
27 * For more complex usages, a view can be partially built:
29 * $view->set_arguments($args);
30 * $view->build('default'); // Build the query
31 * $view->execute(); // Run the query
32 * $output = $view->render(); // Render the view
35 * If short circuited at any point, look in $view->build_info for
36 * information about the query. After execute, look in $view->result
37 * for the array of objects returned from db_query.
41 * $view->set_arguments($args);
42 * $output = $view->render('default'); // Render the view
45 * This illustrates that render is smart enough to call build and execute
46 * if these items have not already been accomplished.
48 * Note that execute also must accomplish other tasks, such
49 * as setting page titles, breadcrumbs, and generating exposed filter
53 return $this->view
->render($this->display
->id
);