CoreFiles by mySites.guru
ModulesModuleField.php49 lines, 1,071 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
1015dc935f0e4b9be12302fdb13e0737
sha1
f5b0251ab341d960db4f054d8f345250fb393e4a
sha256
65516a563cb3ada771b1e28b36803e94454eba424da5c74dfd518ac20831aaf7
<?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\FormHelper;
use Joomla\Component\Modules\Administrator\Helper\ModulesHelper;

FormHelper::loadFieldClass('list');

/**
 * Modules Module field.
 *
 * @since  3.4.2
 */
class ModulesModuleField extends \JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.4.2
	 */
	protected $type = 'ModulesModule';

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   3.4.2
	 */
	public function getOptions()
	{
		$clientId = Factory::getApplication()->getUserState('com_modules.modules.client_id', 0);
		$options  = ModulesHelper::getModules($clientId);

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

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