- md5
- 05d139c873dee78b6237681e6a52f0e2
- sha1
- a10b95cc69be084210c7a727936077116e6c35b8
- sha256
- ad68eec06e2cd2a3d8c0787425473537197f18b6f2ba8a59034f3d2a61a943b7
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
<?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Config\Site\View\Config;
\defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Config\Administrator\Controller\RequestController;
/**
* View for the global configuration
*
* @since 3.2
*/
class HtmlView extends BaseHtmlView
{
/**
* The form object
*
* @var \JForm
* @since 3.2
*/
public $form;
/**
* The data to be displayed in the form
*
* @var array
* @since 3.2
*/
public $data;
/**
* Is the current user a super administrator?
*
* @var boolean
* @since 3.2
*/
protected $userIsSuperAdmin;
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*
* @since 3.2
*/
public function display($tpl = null)
{
$user = Factory::getUser();
$this->userIsSuperAdmin = $user->authorise('core.admin');
// Access backend com_config
$requestController = new RequestController;
// Execute backend controller
$serviceData = json_decode($requestController->getJson(), true);
$form = $this->getForm();
if ($form)
{
$form->bind($serviceData);
}
$this->form = $form;
$this->data = $serviceData;
return parent::display($tpl);
}
}
The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.