CoreFiles by mySites.guru
ModulesPositionField.php46 lines, 1,023 bytes, from Joomla_4.0.0-alpha8-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha7
md5
da74529ec07837c3ffb686726e2848a8
sha1
d4b81881d50cdf91d0d92f273cde80b5150b65e6
sha256
4111d2865b1d0ab7d98569659398b1eac022015d3123c2928c460e7d85da053f
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Modules\Administrator\Field;

defined('JPATH_BASE') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\Component\Modules\Administrator\Helper\ModulesHelper;

/**
 * Modules Position field.
 *
 * @since  3.4.2
 */
class ModulesPositionField extends ListField
{
	/**
	 * 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(Factory::getApplication()->getUserState('com_modules.modules.client_id', 0, 'int'));

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

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