Source for file sidebar.php
Documentation is available at sidebar.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Utility class to render a list view sidebar
* @package Joomla.Libraries
protected static $entries =
array();
protected static $filters =
array();
* Value for the action attribute of the form.
protected static $action =
'';
* @return string The necessary HTML to display the sidebar
public static function render()
$data->list =
static::getEntries();
$data->filters =
static::getFilters();
$data->action =
static::getAction();
$data->displayMenu =
count($data->list);
$data->displayFilters =
count($data->filters);
// Create a layout object and ask it to render the sidebar
$sidebarHtml =
$layout->render($data);
* Method to add a menu item to submenu.
* @param string $name Name of the menu item.
* @param string $link URL of the menu item.
* @param bool $active True if the item is active, false otherwise.
public static function addEntry($name, $link =
'', $active =
false)
array_push(static::$entries, array($name, $link, $active));
* Returns an array of all submenu entries
* Method to add a filter to the submenu
* @param string $label Label for the menu item.
* @param string $name Name for the filter. Also used as id.
* @param string $options Options for the select field.
* @param bool $noDefault Don't the label as the empty option
public static function addFilter($label, $name, $options, $noDefault =
false)
array_push(static::$filters, array('label' =>
$label, 'name' =>
$name, 'options' =>
$options, 'noDefault' =>
$noDefault));
* Returns an array of all filters
* Set value for the action attribute of the filter form
* @param string $action Value for the action attribute of the form
static::$action =
$action;
* Get value for the action attribute of the filter form
public static function getAction()
Documentation generated on Tue, 19 Nov 2013 15:12:59 +0100 by phpDocumentor 1.4.3