CoreFiles by mySites.guru
ModulesPositionField.php49 lines, 1,064 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
3d05b7f738aa1abf80cfb136c9f603ef
sha1
fa26ce99f8be809dd211a30c7f53c94cd6894f55
sha256
9f291139a677f892951c980824fb04f36bbc1ec951624fd7d5fdb72cfa9ce5f0
<?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
 */

namespace Joomla\Component\Modules\Administrator\Field;

defined('JPATH_BASE') or die;

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

FormHelper::loadFieldClass('list');

/**
 * Modules Position field.
 *
 * @since  3.4.2
 */
class ModulesPositionField 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 = Factory::getApplication()->input->get('client_id', 0, 'int');
		$options  = ModulesHelper::getPositions($clientId);

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

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