Source for file contentlanguage.php
Documentation is available at contentlanguage.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 working with content language select lists
* @package Joomla.Libraries
* Cached array of the content language items.
protected static $items =
null;
* Get a list of the available content language items.
* @param boolean $all True to include All (*)
* @param boolean $translate True to translate All
* @see JFormFieldContentLanguage
public static function existing($all =
false, $translate =
false)
if (empty(static::$items))
// Get the database object and a new query object.
$db =
JFactory::getDbo();
$query =
$db->getQuery(true);
$query->select('a.lang_code AS value, a.title AS text, a.title_native')
->from('#__languages AS a')
->where('a.published >= 0')
// Set the query and load the options.
static::$items =
$db->loadObjectList();
array_unshift(static::$items, new JObject(array('value' =>
'*', 'text' =>
$translate ?
JText::alt('JALL', 'language') :
'JALL_LANGUAGE')));
Documentation generated on Tue, 19 Nov 2013 14:56:59 +0100 by phpDocumentor 1.4.3