CoreFiles by mySites.guru
modulesposition.php45 lines, 1,027 bytes, from Joomla_3.6.5-Stable-Full_Package.zip
Raw History Compare with 3.6.4
md5
a7cf9a31bd54df0e0e6f29adc2032bca
sha1
73b3cdd5427b9cb3bbb7d909c437d379a3cb213f
sha256
e9b53009dd0e680a4832a59920e9b60f0e7ed5766ebd56b684b81c7958c3c395
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_BASE') or die;

JFormHelper::loadFieldClass('list');

JLoader::register('ModulesHelper', JPATH_ADMINISTRATOR . '/components/com_modules/helpers/modules.php');

/**
 * ModulesPosition Field class for the Joomla Framework.
 *
 * @since  3.4.2
 */
class JFormFieldModulesPosition extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.4.2
	 */
	protected $type = 'ModulesPosition';

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   3.4.2
	 */
	public function getOptions()
	{
		$clientId = JFactory::getApplication()->input->get('client_id', 0, 'int');
		$options  = ModulesHelper::getPositions($clientId);

		return array_merge(parent::getOptions(), $options);
	}
}

The same content is in 10 releases, Joomla 3.6.1-rc1 to 3.6.5. See them all, or every version of this file.