[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_config/views/application/ -> view.html.php (source)

   1  <?php
   2  /**
   3   * @package        Joomla.Administrator
   4   * @subpackage    com_config
   5   * @copyright    Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   6   * @license        GNU General Public License version 2 or later; see LICENSE.txt
   7   */
   8  
   9  // no direct access
  10  defined('_JEXEC') or die;
  11  
  12  jimport('joomla.application.component.view');
  13  
  14  /**
  15   * @package        Joomla.Administrator
  16   * @subpackage    com_config
  17   */
  18  class ConfigViewApplication extends JView
  19  {
  20      public $state;
  21      public $form;
  22      public $data;
  23  
  24      /**
  25       * Method to display the view.
  26       */
  27  	public function display($tpl = null)
  28      {
  29          $form    = $this->get('Form');
  30          $data    = $this->get('Data');
  31  
  32          // Check for model errors.
  33          if ($errors = $this->get('Errors')) {
  34              JError::raiseError(500, implode('<br />', $errors));
  35              return false;
  36          }
  37  
  38          // Bind the form to the data.
  39          if ($form && $data) {
  40              $form->bind($data);
  41          }
  42  
  43          // Get the params for com_users.
  44          $usersParams = JComponentHelper::getParams('com_users');
  45  
  46          // Get the params for com_media.
  47          $mediaParams = JComponentHelper::getParams('com_media');
  48  
  49          // Load settings for the FTP layer.
  50          $ftp = JClientHelper::setCredentialsFromRequest('ftp');
  51  
  52          $this->assignRef('form',    $form);
  53          $this->assignRef('data',    $data);
  54          $this->assignRef('ftp',        $ftp);
  55          $this->assignRef('usersParams', $usersParams);
  56          $this->assignRef('mediaParams', $mediaParams);
  57  
  58          $this->addToolbar();
  59          parent::display($tpl);
  60      }
  61  
  62      /**
  63       * Add the page title and toolbar.
  64       *
  65       * @since    1.6
  66       */
  67  	protected function addToolbar()
  68      {
  69          JToolBarHelper::title(JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'config.png');
  70          JToolBarHelper::apply('application.apply');
  71          JToolBarHelper::save('application.save');
  72          JToolBarHelper::divider();
  73          JToolBarHelper::cancel('application.cancel');
  74          JToolBarHelper::divider();
  75          JToolBarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
  76      }
  77  }


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1