/** * Get a list of the available menus. * * @return string * * @since 1.6 */ public static function menus() { if (is_null(static::$menus)) { $db = JFactory::getDbo(); $query = $db->getQuery(true)->select($db->qn(array('id', 'menutype', 'title'), array('id', 'value', 'text')))->from($db->quoteName('#__menu_types'))->order('title'); static::$menus = $db->setQuery($query)->loadObjectList(); } return static::$menus; }
/** * Get a list of the available menus. * * @return string * * @since 1.6 */ public static function menus() { if (empty(static::$menus)) { $db = JFactory::getDbo(); $query = $db->getQuery(true)->select('menutype AS value, title AS text')->from($db->quoteName('#__menu_types'))->order('title'); $db->setQuery($query); static::$menus = $db->loadObjectList(); } return static::$menus; }