CoreFiles by mySites.guru
modulesposition.php44 lines, 994 bytes, from Joomla_3.9.0-beta-Beta-Full_Package.zip
Raw History Compare with 3.8.0-beta4
md5
bc0dfe65f67714e4da88fa593e93286a
sha1
7c385e8b7e018480eac02490d9e6a02fb1f01095
sha256
dfb54cbf61dbea32c1385fbd3143f1d52c7742cf0c3610b40ab2f961251cc9ef
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2018 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, 'int'));

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

The same content is in 9 releases, Joomla 3.9.0-beta to 3.9.1. See them all, or every version of this file.