Commit 404b90be authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

Document some methods on the view object.

parent f254213a
......@@ -1036,6 +1036,10 @@ function build($display_id = NULL) {
/**
* Internal method to build an individual set of handlers.
*
* @param string $key
* The type of handlers (filter etc.) which should be iterated over to
* build the relationship and query information.
*/
function _build($key) {
$handlers = &$this->$key;
......@@ -1057,6 +1061,13 @@ function _build($key) {
/**
* Execute the view's query.
*
* @param string $display_id
* The machine name of the display, which should be executed.
*
* @return bool
* Return whether the executing was successful, for example an argument
* could stop the process.
*/
function execute($display_id = NULL) {
if (empty($this->built)) {
......@@ -1113,7 +1124,16 @@ function execute($display_id = NULL) {
}
/**
* Render this view for display.
* Render this view for a certain display.
*
* Note: You should better use just the preview function if you want to
* render a view.
*
* @param string $display_id
* The machine name of the display, which should be rendered.
*
* @return (string|NULL)
* Return the output of the rendered view or NULL if something failed in the process.
*/
function render($display_id = NULL) {
$this->execute($display_id);
......@@ -1227,7 +1247,19 @@ function render($display_id = NULL) {
}
/**
* Render a specific field via the field ID and the row #.
* Render a specific field via the field ID and the row #
*
* Note: You might want to use views_plugin_style::render_fields as it
* caches the output for you.
*
* @param string $field
* The id of the field to be rendered.
*
* @param int $row
* The row number in the $view->result which is used for the rendering.
*
* @return string
* The rendered output of the field.
*/
function render_field($field, $row) {
if (isset($this->field[$field]) && isset($this->result[$row])) {
......@@ -1590,7 +1622,7 @@ function get_breadcrumb($set = FALSE) {
$title = t('Home');
}
if ($title) {
$breadcrumb[] = l($title, $path, array('html' => true));
$breadcrumb[] = l($title, $path, array('html' => TRUE));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment