- md5
- f424e885fd17d120c493a974e6260832
- sha1
- 95bafe20dcd2344e85a52109d1fd28fe7f6466c9
- sha256
- d663ee3226e1e4a236e24b557e40eda367af37b565a5c262e13a984543e28acd
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
<?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2018 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 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.