CoreFiles by mySites.guru
language.php57 lines, 1,288 bytes, from Joomla_1.7.0-Stable-Full_Package.zip
Raw History Compare with 1.6.6
md5
c57f4805148e3d8a8e06023b5972a751
sha1
b8af34ccea20386ae5118de2ac44957178af3b5d
sha256
78567fac100c8ed4582fadb73b41b2c0c014de9636c3be3bdec864309fe6e3f8
<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

jimport('joomla.html.html');
jimport('joomla.language.helper');
jimport('joomla.form.formfield');
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Framework.
 *
 * @package     Joomla.Platform
 * @subpackage  Form
 * @since       11.1
 */
class JFormFieldLanguage extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  11.1
	 */
	protected $type = 'Language';

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 * @since   11.1
	 */
	protected function getOptions()
	{
		// Initialize some field attributes.
		$client	= (string) $this->element['client'];
		if ($client != 'site' && $client != 'administrator') {
			$client = 'site';
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(
			parent::getOptions(),
			JLanguageHelper::createLanguageList($this->value, constant('JPATH_'.strtoupper($client)), true, true)
		);

		return $options;
	}
}

No other release has this exact content. See every version of this file.