CoreFiles by mySites.guru
modulesmodule.php45 lines, 989 bytes, from Joomla_3.8.2-Stable-Full_Package.zip
Raw History Compare with 3.8.1
md5
0971137a4994af561e569fc1a3b233cd
sha1
42219138b1f6f4aa3faf9cbce90a00b7cc4e68fe
sha256
d98e443b0e4e2e36515349d61d198ef8a56b23e7828438d200909d020fd97ec0
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2017 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()
	{
		$clientId = JFactory::getApplication()->input->get('client_id', 0, 'int');
		$options  = ModulesHelper::getModules($clientId);

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

The same content is in 30 releases, Joomla 3.7.0-beta4 to 3.8.3. See them all, or every version of this file.