- md5
- b16757a9498393b0b14f875fcb47793d
- sha1
- a81e4a7a252eec9bd4a83d575f5f33a6d35dc3af
- sha256
- 43058720c3455126935efab1e6e277ce579c6fbf7408fb97c616ab998dc0cec4
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
<?php
/**
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* View class for a list of plugins.
*
* @package Joomla.Administrator
* @subpackage com_plugins
* @since 1.5
*/
class PluginsViewPlugins extends JView
{
protected $items;
protected $pagination;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
// 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_PLUGINS_MSG_MANAGE_NO_PLUGINS')
, 'warning'
);
}
parent::display($tpl);
$this->addToolbar();
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = PluginsHelper::getActions();
JToolBarHelper::title(JText::_('COM_PLUGINS_MANAGER_PLUGINS'), 'plugin');
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('plugin.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('plugins.publish', 'JTOOLBAR_ENABLE', true);
JToolBarHelper::unpublish('plugins.unpublish', 'JTOOLBAR_DISABLE', true);
JToolBarHelper::divider();
JToolBarHelper::checkin('plugins.checkin');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::divider();
JToolBarHelper::preferences('com_plugins');
}
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_EXTENSIONS_PLUGIN_MANAGER');
}
}
The same content is in 7 releases, Joomla 2.5.0 to 2.5.6. See them all, or every version of this file.