Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_languages
  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.  * Displays a list of the installed languages.
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_languages
  17.  * @since       1.6
  18.  */
  19. {
  20.     /**
  21.      * @var object client object
  22.      */
  23.     protected $client = null;
  24.  
  25.     /**
  26.      * @var boolean|JExeptionTrue, if FTP settings should be shown, or an exeption
  27.      */
  28.     protected $ftp = null;
  29.  
  30.     /**
  31.      * @var string option name
  32.      */
  33.     protected $option = null;
  34.  
  35.     /**
  36.      * @var object pagination information
  37.      */
  38.     protected $pagination = null;
  39.  
  40.     /**
  41.      * @var array languages information
  42.      */
  43.     protected $rows = null;
  44.  
  45.     /**
  46.      * @var object user object
  47.      */
  48.     protected $user = null;
  49.  
  50.     /**
  51.      * Display the view
  52.      */
  53.     public function display($tpl null)
  54.     {
  55.         $this->ftp        = $this->get('Ftp');
  56.         $this->option     = $this->get('Option');
  57.         $this->pagination = $this->get('Pagination');
  58.         $this->rows       = $this->get('Data');
  59.         $this->state      $this->get('State');
  60.  
  61.         $client = (int) $this->state->get('filter.client_id'0);
  62.         LanguagesHelper::addSubmenu('installed'$client);
  63.  
  64.         $this->addToolbar();
  65.         parent::display($tpl);
  66.     }
  67.  
  68.     /**
  69.      * Add the page title and toolbar.
  70.      *
  71.      * @since   1.6
  72.      */
  73.     protected function addToolbar()
  74.     {
  75.         require_once JPATH_COMPONENT.'/helpers/languages.php';
  76.  
  77.         $canDo    LanguagesHelper::getActions();
  78.  
  79.         JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_TITLE')'comments-2 langmanager');
  80.  
  81.         if ($canDo->get('core.edit.state'))
  82.         {
  83.             JToolbarHelper::makeDefault('installed.setDefault');
  84.             JToolbarHelper::divider();
  85.         }
  86.  
  87.         if ($canDo->get('core.admin'))
  88.         {
  89.             // Add install languages link to the lang installer component
  90.             $bar JToolbar::getInstance('toolbar');
  91.             $bar->appendButton('Link''upload''COM_LANGUAGES_INSTALL''index.php?option=com_installer&view=languages');
  92.             JToolbarHelper::divider();
  93.  
  94.             JToolbarHelper::preferences('com_languages');
  95.             JToolbarHelper::divider();
  96.         }
  97.  
  98.         JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_INSTALLED');
  99.  
  100.         $this->sidebar JHtmlSidebar::render();
  101.     }
  102. }

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