CoreFiles by mySites.guru
modulesposition.php44 lines, 986 bytes, from Joomla_3.9.15-rc-Release_Candidate-Full_Package.zip
Raw History Compare with 3.9.14-rc
md5
a81eea47dd5f087e6371957ec4ddcbce
sha1
6b92d3455c68e057298ba3ca40c0a28144065a56
sha256
28f7e45aeba6a2c739652b31b298b1c5d5e7f5fbbf39e66d50a6f5e53c76f9ab
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_BASE') or die;

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

JFormHelper::loadFieldClass('list');

/**
 * Modules Position field.
 *
 * @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()
	{
		$options = ModulesHelper::getPositions(JFactory::getApplication()->getUserState('com_modules.modules.client_id', 0));

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

The same content is in 4 releases, Joomla 3.9.15-rc to 3.9.16. See them all, or every version of this file.