- md5
- 09bc8d0d61229c91084ce9a7c2fefe53
- sha1
- 85e0c528c709e6031ecc22906b61aff848906153
- sha256
- 342ec414abb786e77e684e4f6b83d6dee108f1d5dea9ac3c9557c35dab4755c4
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
require_once dirname(dirname(__DIR__)) . '/helper/component.php';
/**
* View for the component configuration
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 1.5
*/
class ConfigViewComponent extends JViewLegacy
{
/**
* Display the view
*/
public function display($tpl = null)
{
$form = $this->get('Form');
$component = $this->get('Component');
$user = JFactory::getUser();
$app = JFactory::getApplication();
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Bind the form to the data.
if ($form && $component->params) {
$form->bind($component->params);
}
$this->form = &$form;
$this->component = &$component;
$this->components = ConfigHelperComponent::getComponentsWithConfig();
ConfigHelperComponent::loadLanguageForComponents($this->components);
$this->userIsSuperAdmin = $user->authorise('core.admin');
$this->currentComponent = JFactory::getApplication()->input->get('component');
$this->return = $app->input->get('return', '', 'base64');
$this->addToolbar();
parent::display($tpl);
$app->input->set('hidemainmenu', true);
}
/**
* Add the page title and toolbar.
*
* @since 3.0
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_($this->component->option . '_configuration'), 'config.png');
JToolbarHelper::apply('component.apply');
JToolbarHelper::save('component.save');
JToolbarHelper::divider();
JToolbarHelper::cancel('component.cancel');
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
}
}
The same content is in 3 releases, Joomla 3.0.0 to 3.0.2. See them all, or every version of this file.