- md5
- 522b61cc15728860802dfb1dc2dde280
- sha1
- a461e7edfd17d9db7e0004392a4cc550b5b185f3
- sha256
- e17b87ff410bce748c450dc1cf6b4da06526f06b6a667f199b6866965d445010
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
<?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright Copyright (C) 2005 - 2013 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 7 releases, Joomla 3.0.3 to 3.1.6. See them all, or every version of this file.