Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_modules
  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.  * HTML View class for the Modules component
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_modules
  17.  * @since       1.6
  18.  */
  19. {
  20.     protected $state;
  21.  
  22.     protected $items;
  23.  
  24.     /**
  25.      * Display the view
  26.      */
  27.     public function display($tpl null)
  28.     {
  29.         $state        $this->get('State');
  30.         $items        $this->get('Items');
  31.  
  32.         // Check for errors.
  33.         if (count($errors $this->get('Errors')))
  34.         {
  35.             JError::raiseError(500implode("\n"$errors));
  36.             return false;
  37.         }
  38.  
  39.         $this->state = &$state;
  40.         $this->items = &$items;
  41.  
  42.         $this->addToolbar();
  43.         parent::display($tpl);
  44.     }
  45.  
  46.     /**
  47.      * Add the page title and toolbar.
  48.      *
  49.      * @since   3.0
  50.      */
  51.     protected function addToolbar()
  52.     {
  53.         // Add page title
  54.         JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES')'cube module');
  55.  
  56.         // Get the toolbar object instance
  57.         $bar JToolBar::getInstance('toolbar');
  58.  
  59.         // Instantiate a new JLayoutFile instance and render the layout
  60.         $layout new JLayoutFile('toolbar.cancelselect');
  61.  
  62.         $bar->appendButton('Custom'$layout->render(array())'new');
  63.     }
  64. }

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