Source for file view.php

Documentation is available at view.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_installer
  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.  * Extension Manager Default View
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_installer
  17.  * @since       1.5
  18.  */
  19. {
  20.     /**
  21.      * Constructor
  22.      *
  23.      * @param   array  $config  Configuration array
  24.      *
  25.      * @since   1.5
  26.      */
  27.     public function __construct($config null)
  28.     {
  29.         $app JFactory::getApplication();
  30.         parent::__construct($config);
  31.         $this->_addPath('template'$this->_basePath . '/views/default/tmpl');
  32.         $this->_addPath('template'JPATH_THEMES '/' $app->getTemplate('/html/com_installer/default');
  33.     }
  34.  
  35.     /**
  36.      * Display the view
  37.      *
  38.      * @param   string  $tpl  Template
  39.      *
  40.      * @return  void 
  41.      *
  42.      * @since   1.5
  43.      */
  44.     public function display($tpl null)
  45.     {
  46.         // Get data from the model
  47.         $state    $this->get('State');
  48.  
  49.         // Are there messages to display ?
  50.         $showMessage    false;
  51.         if (is_object($state))
  52.         {
  53.             $message1        $state->get('message');
  54.             $message2        $state->get('extension_message');
  55.             $showMessage    ($message1 || $message2);
  56.         }
  57.  
  58.         $this->showMessage $showMessage;
  59.         $this->state &$state;
  60.  
  61.         $this->addToolbar();
  62.         parent::display($tpl);
  63.     }
  64.  
  65.     /**
  66.      * Add the page title and toolbar.
  67.      *
  68.      * @return  void 
  69.      *
  70.      * @since   1.6
  71.      */
  72.     protected function addToolbar()
  73.     {
  74.         $canDo    InstallerHelper::getActions();
  75.         JToolbarHelper::title(JText::_('COM_INSTALLER_HEADER_' $this->getName())'puzzle install');
  76.  
  77.         if ($canDo->get('core.admin'))
  78.         {
  79.             JToolbarHelper::preferences('com_installer');
  80.             JToolbarHelper::divider();
  81.         }
  82.  
  83.         // Document
  84.         $document JFactory::getDocument();
  85.         $document->setTitle(JText::_('COM_INSTALLER_TITLE_' $this->getName()));
  86.  
  87.         // Render side bar
  88.         $this->sidebar JHtmlSidebar::render();
  89.     }
  90. }

Documentation generated on Tue, 19 Nov 2013 15:18:13 +0100 by phpDocumentor 1.4.3