CoreFiles by mySites.guru
modulesmodule.php44 lines, 978 bytes, from Joomla_3.9.15-rc-Release_Candidate-Full_Package.zip
Raw History Compare with 3.9.14-rc
md5
8feb40514cb41254c81eab6760c269c8
sha1
c72c766d46c79e4f7ccc13dddaba0c645b91d61c
sha256
669e0e1926e57754e7b28156859c7a10ad7071f2530a0c4625541f6d695be999
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_BASE') or die;

JLoader::register('ModulesHelper', JPATH_ADMINISTRATOR . '/components/com_modules/helpers/modules.php');

JFormHelper::loadFieldClass('list');

/**
 * Modules Module field.
 *
 * @since  3.4.2
 */
class JFormFieldModulesModule 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()
	{
		$options = ModulesHelper::getModules(JFactory::getApplication()->getUserState('com_modules.modules.client_id', 0));

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

The same content is in 4 releases, Joomla 3.9.15-rc to 3.9.16. See them all, or every version of this file.