public static function assetgroups($config = array())
	{
		if (empty(self::$asset_groups))
		{
			$db = App::get('db');

			$query = $db->getQuery()
				->select('a.id', 'value')
				->select('a.title', 'text')
				->from('#__viewlevels', 'a')
				->group('a.id')
				->group('a.title')
				->group('a.ordering')
				->order('a.ordering', 'asc');

			$db->setQuery($query->toString());
			self::$asset_groups = $db->loadObjectList();

			// Check for a database error.
			if ($db->getErrorNum())
			{
				throw new Exception($db->getErrorMsg(), 500, E_WARNING);
				return false;
			}
		}

		return self::$asset_groups;
	}
public static function assetgroups($config = array())
	{
		if (empty(self::$asset_groups))
		{
			$db = App::get('db');

			$query = $db->getQuery()
				->select('a.id', 'value')
				->select('a.title', 'text')
				->from('#__viewlevels', 'a')
				->group('a.id')
				->group('a.title')
				->group('a.ordering')
				->order('a.ordering', 'asc');

			$db->setQuery($query->toString());
			self::$asset_groups = $db->loadObjectList();

			// Check for a database error.
			if ($db->getErrorNum())
			{
				throw new Exception($db->getErrorMsg(), 500, E_WARNING);
				return false;
			}
		}

		return self::$asset_groups;
	}
public static function assetgroups ( $ config = array ( ) ) { if ( empty ( self :: $ asset_groups ) ) { $ db = App :: get ( 'db' ) ; $ query = $ db -> getQuery ( ) -> select ( 'a.id' , 'value' ) -> select ( 'a.title' , 'text' ) -> from ( '#__viewlevels' , 'a' ) -> group ( 'a.id' ) -> group ( 'a.title' ) -> group ( 'a.ordering' ) -> order ( 'a.ordering' , 'asc' ) ; $ db -> setQuery ( $ query -> toString ( ) ) ; self :: $ asset_groups = $ db -> loadObjectList ( ) ; // Check for a database error. if ( $ db -> getErrorNum ( ) ) { throw new Exception ( $ db -> getErrorMsg ( ) , 500 , E_WARNING ) ; return false ; } } return self :: $ asset_groups ; }
Gets a list of the asset groups as an array of options.

@param   array  $config  An array of options for the options
@return  mixed  An array or false if an error occurs
Gets a list of the asset groups as an array of options .