- md5
- af1bcad66e1554faf3b84ee682280fdd
- sha1
- 1aa76169d02ff463f90b9201db78bc66ae04fee5
- sha256
- b3da5734f7485cc359fdeba8f93f71ca1c7d8b8bb8016ed669ad219f9243183c
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
<?php
/**
* @version $Id: view.html.php 20196 2011-01-09 02:40:25Z ian $
* @copyright Copyright (C) 2005 - 2011 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 to edit a plugin.
*
* @package Joomla.Administrator
* @subpackage Plugins
* @since 1.5
*/
class PluginsViewPlugin extends JView
{
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', 'JTOOLBAR_APPLY');
JToolBarHelper::save('plugin.save', 'JTOOLBAR_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 1.6.0 to 1.6.1. See them all, or every version of this file.