Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_installer
  5.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  6.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8.  
  9. defined('_JEXEC'or die;
  10.  
  11. include_once __DIR__ . '/../default/view.php';
  12.  
  13. /**
  14.  * Language installer view
  15.  *
  16.  * @package     Joomla.Administrator
  17.  * @subpackage  com_installer
  18.  * @since       2.5.7
  19.  */
  20. {
  21.     /**
  22.      * @var object item list
  23.      */
  24.     protected $items;
  25.  
  26.     /**
  27.      * @var object pagination information
  28.      */
  29.     protected $pagination;
  30.  
  31.     /**
  32.      * @var object model state
  33.      */
  34.     protected $state;
  35.  
  36.     /**
  37.      * Display the view
  38.      *
  39.      * @param   null  $tpl  template to display
  40.      *
  41.      * @return mixed|void
  42.      */
  43.     public function display($tpl null)
  44.     {
  45.         // Get data from the model
  46.         $this->state      = $this->get('State');
  47.         $this->items      = $this->get('Items');
  48.         $this->pagination = $this->get('Pagination');
  49.  
  50.         // Check for errors.
  51.         if (count($errors $this->get('Errors')))
  52.         {
  53.             JError::raiseError(500implode("\n"$errors));
  54.             return false;
  55.         }
  56.  
  57.         parent::display($tpl);
  58.     }
  59.  
  60.     /**
  61.      * Add the page title and toolbar.
  62.      *
  63.      * @return void 
  64.      */
  65.     protected function addToolbar()
  66.     {
  67.         $canDo InstallerHelper::getActions();
  68.         JToolBarHelper::title(JText::_('COM_INSTALLER_HEADER_' $this->getName())'puzzle install');
  69.  
  70.         if ($canDo->get('core.admin'))
  71.         {
  72.             JToolBarHelper::custom('languages.install''upload''upload''COM_INSTALLER_TOOLBAR_INSTALL'truefalse);
  73.             JToolBarHelper::custom('languages.find''refresh''refresh''COM_INSTALLER_TOOLBAR_FIND_LANGUAGES'falsefalse);
  74.             JToolBarHelper::divider();
  75.             parent::addToolbar();
  76.  
  77.             // TODO: this help screen will need to be created
  78.             JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_LANGUAGES');
  79.         }
  80.     }
  81. }

Documentation generated on Tue, 19 Nov 2013 15:17:34 +0100 by phpDocumentor 1.4.3