- md5
- 816f953f8319e516b0f4898dfd5241ce
- sha1
- 1eecc41d85df320a5673073e14b53718afa75924
- sha256
- 9d1adbbf3c9d960a20c2695bbb54c9b4b2bba54d73c441988d73ce849d1683a9
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
<?php
/**
* @version $Id: view.php 20196 2011-01-09 02:40:25Z ian $
* @package Joomla.Administrator
* @subpackage com_installer
* @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');
/**
* Extension Manager Default View
*
* @package Joomla.Administrator
* @subpackage com_installer
* @since 1.5
*/
class InstallerViewDefault extends JView
{
/**
* @since 1.5
*/
function __construct($config = null)
{
$app = JFactory::getApplication();
parent::__construct($config);
$this->_addPath('template', $this->_basePath.DS.'views'.DS.'default'.DS.'tmpl');
$this->_addPath('template', JPATH_THEMES.'/'.$app->getTemplate().'/html/com_installer/default');
}
/**
* @since 1.5
*/
function display($tpl=null)
{
// Get data from the model
$state = $this->get('State');
// Are there messages to display ?
$showMessage = false;
if (is_object($state)) {
$message1 = $state->get('message');
$message2 = $state->get('extension_message');
$showMessage = ($message1 || $message2);
}
$this->assign('showMessage', $showMessage);
$this->assignRef('state', $state);
JHtml::_('behavior.tooltip');
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = InstallerHelper::getActions();
JToolBarHelper::title(JText::_('COM_INSTALLER_HEADER_' . $this->getName()), 'install.png');
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_installer');
JToolBarHelper::divider();
}
// Document
$document = JFactory::getDocument();
$document->setTitle(JText::_('COM_INSTALLER_TITLE_' . $this->getName()));
}
}
The same content is in 7 releases, Joomla 1.6.0 to 1.6.6. See them all, or every version of this file.