- md5
- 58469809e684c4e38bb708d5ce06e35c
- sha1
- 682967c2b60aeaead35c124e777ac758dc12c452
- sha256
- b026021c5cc16d048ee723505fbdebdcee5ad19d29b9dae0a1df05cd690476d3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
<?php
/**
* @package Joomla.Administrator
* @subpackage com_installer
*
* @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\Installer\Administrator\View\Manage;
\defined('_JEXEC') or die;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;
/**
* Extension Manager Manage View
*
* @since 1.6
*/
class HtmlView extends InstallerViewDefault
{
/**
* List of updatesites
*
* @var \stdClass[]
*/
protected $items;
/**
* Pagination object
*
* @var Pagination
*/
protected $pagination;
/**
* Form object
*
* @var Form
*/
protected $form;
/**
* Display the view.
*
* @param string $tpl Template
*
* @return mixed|void
*
* @since 1.6
*/
public function display($tpl = null)
{
// Get data from the model.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new GenericDataException(implode("\n", $errors), 500);
}
// Display the view.
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = ContentHelper::getActions('com_installer');
if ($canDo->get('core.edit.state'))
{
ToolbarHelper::publish('manage.publish', 'JTOOLBAR_ENABLE', true);
ToolbarHelper::unpublish('manage.unpublish', 'JTOOLBAR_DISABLE', true);
ToolbarHelper::divider();
}
ToolbarHelper::custom('manage.refresh', 'refresh', 'refresh', 'JTOOLBAR_REFRESH_CACHE', true);
ToolbarHelper::divider();
if ($canDo->get('core.delete'))
{
ToolbarHelper::deleteList('COM_INSTALLER_CONFIRM_UNINSTALL', 'manage.remove', 'JTOOLBAR_UNINSTALL');
ToolbarHelper::divider();
}
parent::addToolbar();
ToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_MANAGE');
}
}
The same content is in 2 releases, Joomla 4.0.0-beta to 4.0.0-beta2. See them all, or every version of this file.