- md5
- 9b377e0038bcd33cd8f5cb1868fd8911
- sha1
- 11b025bf0194d313b0c944da889ff1a8b9f35cf7
- sha256
- 94307b0d5b12812f576d22ae681667b27ca8636dd19398dcfd007d482d226e5d
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
<?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* HTML View class for the Modules component
*
* @package Joomla.Administrator
* @subpackage com_modules
* @since 1.6
*/
class ModulesViewSelect extends JViewLegacy
{
protected $state;
protected $items;
/**
* Display the view
*/
public function display($tpl = null)
{
$state = $this->get('State');
$items = $this->get('Items');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->state = &$state;
$this->items = &$items;
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 3.0
*/
protected function addToolbar()
{
// Add page title
JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'module.png');
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
// Cancel
$title = JText::_('JTOOLBAR_CANCEL');
$dhtml = "<button onClick=\"location.href='index.php?option=com_modules'\" class=\"btn\">
<i class=\"icon-remove\" title=\"$title\"></i>
$title</button>";
$bar->appendButton('Custom', $dhtml, 'new');
}
}
The same content is in 3 releases, Joomla 3.0.0 to 3.0.2. See them all, or every version of this file.