- md5
- 34545859e71f95cd78d0268acbe8c2a9
- sha1
- 1d3d42591e311ed4d0f5d2134194090ecfb573c3
- sha256
- d45d0774193cce4945f0fa74ad99cc4cfb26e0f7a939b03bb3f68060926dd065
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
<?php
/**
* @package Joomla.Administrator
* @subpackage com_postinstall
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Postinstall\Administrator\View\Messages;
\defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Postinstall\Administrator\Model\MessagesModel;
/**
* Model class to display postinstall messages
*
* @since 3.2
*/
class HtmlView extends BaseHtmlView
{
/**
* Executes before rendering the page for the Browse task.
*
* @param string $tpl Subtemplate to use
*
* @return boolean Return true to allow rendering of the page
*
* @since 3.2
*/
public function display($tpl = null)
{
/** @var MessagesModel $model */
$model = $this->getModel();
$this->items = $model->getItems();
$this->joomlaFilesExtensionId = $model->getJoomlaFilesExtensionId();
$this->eid = (int) $model->getState('eid', $this->joomlaFilesExtensionId, 'int');
if (empty($this->eid))
{
$this->eid = $this->joomlaFilesExtensionId;
}
$this->toolbar();
$this->token = Factory::getSession()->getFormToken();
$this->extension_options = $model->getComponentOptions();
ToolbarHelper::title(Text::sprintf('COM_POSTINSTALL_MESSAGES_TITLE', $model->getExtensionName($this->eid)));
return parent::display($tpl);
}
/**
* displays the toolbar
*
* @return void
*
* @since 3.6
*/
private function toolbar()
{
$toolbar = Toolbar::getInstance('toolbar');
if (!empty($this->items))
{
$toolbar->unpublish('message.hideAll', 'COM_POSTINSTALL_HIDE_ALL_MESSAGES');
}
// Options button.
if (Factory::getUser()->authorise('core.admin', 'com_postinstall'))
{
$toolbar->preferences('com_postinstall');
$toolbar->help('JHELP_COMPONENTS_POST_INSTALLATION_MESSAGES');
}
}
}
The same content is in 3 releases, Joomla 4.0.0-beta3 to 4.0.0-beta5. See them all, or every version of this file.