public function load()
	{
		if (!($this->get('db') instanceof \Hubzero\Database\Driver))
		{
			return;
		}

		// Initialise variables.
		$db = $this->get('db');

		$query = $db->getQuery()
			->select('m.id')
			->select('m.menutype')
			->select('m.title')
			->select('m.alias')
			->select('m.note')
			->select('m.path', 'route')
			->select('m.link')
			->select('m.type')
			->select('m.level')
			->select('m.language')
			->select('m.browserNav')
			->select('m.access')
			->select('m.params')
			->select('m.home')
			->select('m.img')
			->select('m.template_style_id')
			->select('m.component_id')
			->select('m.parent_id')
			->select('e.element', 'component')
			->from('#__menu', 'm')
			->join('#__extensions AS e', 'e.extension_id', 'm.component_id', 'left')
			->whereEquals('m.published', 1)
			->where('m.parent_id', '>', 0)
			->whereEquals('m.client_id', 0)
			->order('m.lft', 'asc');

		// Set the query
		$db->setQuery($query->toString());

		$this->_items = $db->loadObjectList('id');

		foreach ($this->_items as &$item)
		{
			// Get parent information.
			$parent_tree = array();
			if (isset($this->_items[$item->parent_id]))
			{
				$parent_tree  = $this->_items[$item->parent_id]->tree;
			}

			// Create tree.
			$parent_tree[] = $item->id;
			$item->tree = $parent_tree;

			// Create the query array.
			$url = str_replace('index.php?', '', $item->link);
			$url = str_replace('&amp;', '&', $url);

			parse_str($url, $item->query);
		}
	}
public function load()
	{
		if (!($this->get('db') instanceof \Hubzero\Database\Driver))
		{
			return;
		}

		// Initialise variables.
		$db = $this->get('db');

		$query = $db->getQuery()
			->select('m.id')
			->select('m.menutype')
			->select('m.title')
			->select('m.alias')
			->select('m.note')
			->select('m.path', 'route')
			->select('m.link')
			->select('m.type')
			->select('m.level')
			->select('m.language')
			->select('m.browserNav')
			->select('m.access')
			->select('m.params')
			->select('m.home')
			->select('m.img')
			->select('m.template_style_id')
			->select('m.component_id')
			->select('m.parent_id')
			->select('e.element', 'component')
			->from('#__menu', 'm')
			->join('#__extensions AS e', 'e.extension_id', 'm.component_id', 'left')
			->whereEquals('m.published', 1)
			->where('m.parent_id', '>', 0)
			->whereEquals('m.client_id', 0)
			->order('m.lft', 'asc');

		// Set the query
		$db->setQuery($query->toString());

		$this->_items = $db->loadObjectList('id');

		foreach ($this->_items as &$item)
		{
			// Get parent information.
			$parent_tree = array();
			if (isset($this->_items[$item->parent_id]))
			{
				$parent_tree  = $this->_items[$item->parent_id]->tree;
			}

			// Create tree.
			$parent_tree[] = $item->id;
			$item->tree = $parent_tree;

			// Create the query array.
			$url = str_replace('index.php?', '', $item->link);
			$url = str_replace('&amp;', '&', $url);

			parse_str($url, $item->query);
		}
	}
public function load ( ) { if ( ! ( $ this -> get ( 'db' ) instanceof \ Hubzero \ Database \ Driver ) ) { return ; } // Initialise variables. $ db = $ this -> get ( 'db' ) ; $ query = $ db -> getQuery ( ) -> select ( 'm.id' ) -> select ( 'm.menutype' ) -> select ( 'm.title' ) -> select ( 'm.alias' ) -> select ( 'm.note' ) -> select ( 'm.path' , 'route' ) -> select ( 'm.link' ) -> select ( 'm.type' ) -> select ( 'm.level' ) -> select ( 'm.language' ) -> select ( 'm.browserNav' ) -> select ( 'm.access' ) -> select ( 'm.params' ) -> select ( 'm.home' ) -> select ( 'm.img' ) -> select ( 'm.template_style_id' ) -> select ( 'm.component_id' ) -> select ( 'm.parent_id' ) -> select ( 'e.element' , 'component' ) -> from ( '#__menu' , 'm' ) -> join ( '#__extensions AS e' , 'e.extension_id' , 'm.component_id' , 'left' ) -> whereEquals ( 'm.published' , 1 ) -> where ( 'm.parent_id' , '>' , 0 ) -> whereEquals ( 'm.client_id' , 0 ) -> order ( 'm.lft' , 'asc' ) ; // Set the query $ db -> setQuery ( $ query -> toString ( ) ) ; $ this -> _items = $ db -> loadObjectList ( 'id' ) ; foreach ( $ this -> _items as & $ item ) { // Get parent information. $ parent_tree = array ( ) ; if ( isset ( $ this -> _items [ $ item -> parent_id ] ) ) { $ parent_tree = $ this -> _items [ $ item -> parent_id ] -> tree ; } // Create tree. $ parent_tree [ ] = $ item -> id ; $ item -> tree = $ parent_tree ; // Create the query array. $ url = str_replace ( 'index.php?' , '' , $ item -> link ) ; $ url = str_replace ( '&amp;' , '&' , $ url ) ; parse_str ( $ url , $ item -> query ) ; } }
Loads the entire menu table into memory.

@return  array
Loads the entire menu table into memory .