/content/code/trunk/administrator/components/com_artofcontent/libraries/jxtended/form/fields/language.php
PHP | 46 lines | 18 code | 5 blank | 23 comment | 0 complexity | 9762409261d48e6bb12804d88918da70 MD5 | raw file
- <?php
- /**
- * @version $Id: language.php 484 2010-12-20 23:40:27Z eddieajau $
- * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License
- * @link http://www.theartofjoomla.com
- */
- defined('JPATH_BASE') or die;
- jimport('joomla.html.html');
- require_once dirname(__FILE__).'/list.php';
- /**
- * Form Field class for the Joomla Framework.
- *
- * @package JXtended.Libraries
- * @subpackage Form
- * @since 1.1
- */
- class JFormFieldLanguage extends JFormFieldList
- {
- /**
- * The field type.
- *
- * @var string
- */
- protected $type = 'Language';
- /**
- * Method to get a list of options for a list input.
- *
- * @return array An array of JHtml options.
- */
- protected function _getOptions()
- {
- jimport('joomla.language.helper');
- $client = $this->_element->attributes('client');
- $options = array_merge(
- parent::_getOptions(),
- JLanguageHelper::createLanguageList($this->value, constant('JPATH_'.strtoupper($client)), true)
- );
- return $options;
- }
- }