Source for file site.php
Documentation is available at site.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.txt
* @package Joomla.Libraries
* Loads the entire menu table into memory.
$query =
$db->getQuery(true)
->select('m.id, m.menutype, m.title, m.alias, m.note, m.path AS route, m.link, m.type, m.level, m.language')
->select($db->quoteName('m.browserNav') .
', m.access, m.params, m.home, m.img, m.template_style_id, m.component_id, m.parent_id')
->select('e.element as component')
->join('LEFT', '#__extensions AS e ON m.component_id = e.extension_id')
->where('m.published = 1')
->where('m.parent_id > 0')
->where('m.client_id = 0')
$this->_items =
$db->loadObjectList('id');
catch
(RuntimeException $e)
foreach ($this->_items as &$item)
// Get parent information.
if (isset
($this->_items[$item->parent_id]))
$parent_tree =
$this->_items[$item->parent_id]->tree;
$parent_tree[] =
$item->id;
$item->tree =
$parent_tree;
// Create the query array.
* Gets menu items by attribute
* @param string $attributes The field name
* @param string $values The value of the field
* @param boolean $firstonly If true, only returns the first item found
public function getItems($attributes, $values, $firstonly =
false)
$attributes = (array)
$attributes;
$values = (array)
$values;
// Filter by language if not set
if (($key =
array_search('language', $attributes)) ===
false)
$attributes[] =
'language';
elseif ($values[$key] ===
null)
unset
($attributes[$key]);
// Filter by access level if not set
$attributes[] =
'access';
elseif ($values[$key] ===
null)
unset
($attributes[$key]);
// Reset arrays or we get a notice if some values were unset
return parent::getItems($attributes, $values, $firstonly);
* @param string $language The language code.
* @return object The item object
Documentation generated on Tue, 19 Nov 2013 15:13:50 +0100 by phpDocumentor 1.4.3