CoreFiles by mySites.guru
ModulesPositioneditField.php64 lines, 1,404 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
4111b0da599d34f7b269d3597a85a879
sha1
27ecaa66d8c80c02eaf7e7863b34544c7f3f5c6c
sha256
f56b8a551bd6a07f2c333212a7334685c4d82e11cb80a1fe36fcd6c9632de274
<?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\FormField;
use Joomla\CMS\HTML\HTMLHelper;

/**
 * Edit Modules Position field.
 *
 * @since  4.0.0
 */
class ModulesPositioneditField extends FormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  4.0.0
	 */
	protected $type = 'ModulesPositionedit';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  4.0.0
	 */
	protected $layout = 'joomla.form.field.modulespositionedit';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   4.0.0
	 */
	protected function getInput()
	{
		$data = $this->getLayoutData();

		$clientId  = Factory::getApplication()->input->get('client_id', 0, 'int');
		$positions = HTMLHelper::_('modules.positions', $clientId, 1, $this->value);

		$data['client']    = $clientId;
		$data['positions'] = $positions;

		$renderer = $this->getRenderer($this->layout);
		$renderer->setComponent('com_modules');
		$renderer->setClient(1);

		return $renderer->render($data);
	}
}

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