Source for file html.php

Documentation is available at html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_config
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * View for the global configuration
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_config
  17.  * @since       3.2
  18.  */
  19. {
  20.     public $state;
  21.  
  22.     public $form;
  23.  
  24.     public $data;
  25.  
  26.     /**
  27.      * Method to display the view.
  28.      *
  29.      * @return  string  The rendered view.
  30.      *
  31.      * @since   3.2
  32.      */
  33.     public function render()
  34.     {
  35.         $form null;
  36.         $data null;
  37.  
  38.         try
  39.         {
  40.             // Load Form and Data
  41.             $form $this->model->getForm();
  42.             $data $this->model->getData();
  43.             $user JFactory::getUser();
  44.         }
  45.         catch (Exception $e)
  46.         {
  47.             JFactory::getApplication()->enqueueMessage($e->getMessage()'error');
  48.  
  49.             return false;
  50.         }
  51.  
  52.         // Bind data
  53.         if ($form && $data)
  54.         {
  55.             $form->bind($data);
  56.         }
  57.         // Get the params for com_users.
  58.         $usersParams JComponentHelper::getParams('com_users');
  59.  
  60.         // Get the params for com_media.
  61.         $mediaParams JComponentHelper::getParams('com_media');
  62.  
  63.         // Load settings for the FTP layer.
  64.         $ftp JClientHelper::setCredentialsFromRequest('ftp');
  65.  
  66.         $this->form = &$form;
  67.         $this->data = &$data;
  68.         $this->ftp &$ftp;
  69.         $this->usersParams &$usersParams;
  70.         $this->mediaParams &$mediaParams;
  71.  
  72.         $this->components ConfigHelperConfig::getComponentsWithConfig();
  73.         ConfigHelperConfig::loadLanguageForComponents($this->components);
  74.  
  75.         $this->userIsSuperAdmin $user->authorise('core.admin');
  76.  
  77.         $this->addToolbar();
  78.  
  79.         return parent::render();
  80.     }
  81.  
  82.     /**
  83.      * Add the page title and toolbar.
  84.      *
  85.      * @return  void 
  86.      *
  87.      * @since    3.2
  88.      */
  89.     protected function addToolbar()
  90.     {
  91.         JToolbarHelper::title(JText::_('COM_CONFIG_GLOBAL_CONFIGURATION')'equalizer config');
  92.         JToolbarHelper::apply('config.save.application.apply');
  93.         JToolbarHelper::save('config.save.application');
  94.         JToolbarHelper::divider();
  95.         JToolbarHelper::cancel('config.cancel.application');
  96.         JToolbarHelper::divider();
  97.         JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
  98.     }
  99. }

Documentation generated on Tue, 19 Nov 2013 15:04:45 +0100 by phpDocumentor 1.4.3