[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_installer/views/default/ -> view.php (source)

   1  <?php
   2  /**
   3   * @package        Joomla.Administrator
   4   * @subpackage    com_installer
   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   * Extension Manager Default View
  16   *
  17   * @package        Joomla.Administrator
  18   * @subpackage    com_installer
  19   * @since        1.5
  20   */
  21  class InstallerViewDefault extends JView
  22  {
  23      /**
  24       * @since    1.5
  25       */
  26  	function __construct($config = null)
  27      {
  28          $app = JFactory::getApplication();
  29          parent::__construct($config);
  30          $this->_addPath('template', $this->_basePath . '/views/default/tmpl');
  31          $this->_addPath('template', JPATH_THEMES.'/'.$app->getTemplate().'/html/com_installer/default');
  32      }
  33  
  34      /**
  35       * @since    1.5
  36       */
  37  	function display($tpl=null)
  38      {
  39          // Get data from the model
  40          $state    = $this->get('State');
  41  
  42          // Are there messages to display ?
  43          $showMessage    = false;
  44          if (is_object($state)) {
  45              $message1        = $state->get('message');
  46              $message2        = $state->get('extension_message');
  47              $showMessage    = ($message1 || $message2);
  48          }
  49  
  50          $this->assign('showMessage',    $showMessage);
  51          $this->assignRef('state',        $state);
  52  
  53          JHtml::_('behavior.tooltip');
  54          $this->addToolbar();
  55          parent::display($tpl);
  56      }
  57  
  58      /**
  59       * Add the page title and toolbar.
  60       *
  61       * @since    1.6
  62       */
  63  	protected function addToolbar()
  64      {
  65          $canDo    = InstallerHelper::getActions();
  66          JToolBarHelper::title(JText::_('COM_INSTALLER_HEADER_' . $this->getName()), 'install.png');
  67  
  68          if ($canDo->get('core.admin')) {
  69              JToolBarHelper::preferences('com_installer');
  70              JToolBarHelper::divider();
  71          }
  72  
  73          // Document
  74          $document = JFactory::getDocument();
  75          $document->setTitle(JText::_('COM_INSTALLER_TITLE_' . $this->getName()));
  76      }
  77  }


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