- md5
- 3372ee4934143eb0c3b22d4e7338c243
- sha1
- aa5bb238a738d8d65afaf52b67d62a26723e8c34
- sha256
- f0bffe8f679c8111f56f85cc2a4b07772244a1d93c8129106686ea108afcb1af
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
<?php
/**
* @package Joomla.Administrator
* @subpackage com_installer
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
include_once dirname(__FILE__).'/../default/view.php';
/**
* Extension Manager Manage View
*
* @package Joomla.Administrator
* @subpackage com_installer
* @since 1.6
*/
class InstallerViewManage extends InstallerViewDefault
{
protected $items;
protected $pagination;
protected $form;
protected $state;
/**
* @since 1.6
*/
function display($tpl=null)
{
// Get data from the model
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->form = $this->get('Form');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
//Check if there are no matching items
if(!count($this->items)){
JFactory::getApplication()->enqueueMessage(
JText::_('COM_INSTALLER_MSG_MANAGE_NOEXTENSION')
, 'warning'
);
}
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
// Display the view
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = InstallerHelper::getActions();
if ($canDo->get('core.edit.state')) {
JToolBarHelper::publish('manage.publish', 'JTOOLBAR_ENABLE', true);
JToolBarHelper::unpublish('manage.unpublish', 'JTOOLBAR_DISABLE', true);
JToolBarHelper::divider();
}
JToolBarHelper::custom('manage.refresh', 'refresh', 'refresh', 'JTOOLBAR_REFRESH_CACHE', true);
JToolBarHelper::divider();
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'manage.remove', 'JTOOLBAR_UNINSTALL');
JToolBarHelper::divider();
}
parent::addToolbar();
JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_MANAGE');
}
}
The same content is in 10 releases, Joomla 2.5.18 to 2.5.27. See them all, or every version of this file.