CoreFiles by mySites.guru
controller.php43 lines, 1,176 bytes, from Joomla_3.10.12-Stable-Full_Package.zip
Raw History Compare with 3.10.11
md5
4fb99f90e19339738e920f829344bfe7
sha1
933edfaf09828a8a4567495a18761a48afc94be6
sha256
8f568a1423bc53d48a762c30f5abbff81421c39298f7c370a243bdb73c1a2710
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_fields
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Base controller class for Fields Component.
 *
 * @since  3.7.0
 */
class FieldsController extends JControllerLegacy
{
	/**
	 * Constructor.
	 *
	 * @param   array  $config  An optional associative array of configuration settings.
	 *                          Recognized key values include 'name', 'default_task', 'model_path', and
	 *                          'view_path' (this list is not meant to be comprehensive).
	 *
	 * @since   3.7.0
	 */
	public function __construct($config = array())
	{
		$this->input = JFactory::getApplication()->input;

		// Frontpage Editor Fields Button proxying:
		if ($this->input->get('view') === 'fields' && $this->input->get('layout') === 'modal')
		{
			// Load the backend language file.
			$lang = JFactory::getLanguage();
			$lang->load('com_fields', JPATH_ADMINISTRATOR);

			$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
		}

		parent::__construct($config);
	}
}

The same content is in 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.