- md5
- 956497304c9b06e662c4806acec50a19
- sha1
- 110d85076d53715ec787ba69818ae73748638df3
- sha256
- 4c0243943b5673b0bb3ddb9a2b5880da15babdd080a9a4330dc9e3a417604bf6
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
<?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
*/
defined('_JEXEC') or die;
/**
* View to edit a plugin.
*
* @package Joomla.Administrator
* @subpackage com_plugins
* @since 1.5
*/
class PluginsViewPlugin extends JViewLegacy
{
protected $item;
protected $form;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JRequest::setVar('hidemainmenu', true);
$user = JFactory::getUser();
$canDo = PluginsHelper::getActions();
JToolBarHelper::title(JText::sprintf('COM_PLUGINS_MANAGER_PLUGIN', JText::_($this->item->name)), 'plugin');
// If not checked out, can save the item.
if ($canDo->get('core.edit')) {
JToolBarHelper::apply('plugin.apply');
JToolBarHelper::save('plugin.save');
}
JToolBarHelper::cancel('plugin.cancel', 'JTOOLBAR_CLOSE');
JToolBarHelper::divider();
// Get the help information for the plugin item.
$lang = JFactory::getLanguage();
$help = $this->get('Help');
if ($lang->hasKey($help->url)) {
$debug = $lang->setDebug(false);
$url = JText::_($help->url);
$lang->setDebug($debug);
}
else {
$url = null;
}
JToolBarHelper::help($help->key, false, $url);
}
}
The same content is in 2 releases, Joomla 2.5.7 to 2.5.8. See them all, or every version of this file.