X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Fdisplay%2FDefaultDisplay.php;fp=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Fdisplay%2FDefaultDisplay.php;h=ec01d6a30089c18155dcf0f69af4d4313704be57;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/views/src/Plugin/views/display/DefaultDisplay.php b/web/core/modules/views/src/Plugin/views/display/DefaultDisplay.php new file mode 100644 index 000000000..ec01d6a30 --- /dev/null +++ b/web/core/modules/views/src/Plugin/views/display/DefaultDisplay.php @@ -0,0 +1,70 @@ +executeDisplay('default', $args); + * @endcode + * + * For more complex usages, a view can be partially built: + * @code + * $view->setArguments($args); + * $view->build('default'); // Build the query + * $view->preExecute(); // Pre-execute the query. + * $view->execute(); // Run the query + * $output = $view->render(); // Render the view + * @endcode + * + * If short circuited at any point, look in $view->build_info for + * information about the query. After execute, look in $view->result + * for the array of objects returned from db_query. + * + * You can also do: + * @code + * $view->setArguments($args); + * $output = $view->render('default'); // Render the view + * @endcode + * + * This illustrates that render is smart enough to call build and execute + * if these items have not already been accomplished. + * + * Note that execute also must accomplish other tasks, such as setting page + * titles, and generating exposed filter data if necessary. + */ + public function execute() { + return $this->view->render($this->display['id']); + } + +}