CoreFiles by mySites.guru
ModulesPositionField.php46 lines, 1,015 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
37b96e64a27d2c8175c4e6bad76be789
sha1
be59833a8fbc2c89773f891e595f3edf017d48df
sha256
22b7041f14b28284e1d3b7161fedf44a2b3035d8945236a6a046144d264c1477
<?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));

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

The same content is in 4 releases, Joomla 4.0.0-alpha9 to 4.0.0-alpha12. See them all, or every version of this file.