- md5
- 90dd947e3d8331ee1dd5eeab9565f363
- sha1
- 574c79b9eb6d70b805f1e0a4abbf2df64ff71948
- sha256
- aa45748fe302860170a8042b0bdae87edab265c514eef95f98faa36adb6a5df6
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
<?php
/**
* @package Joomla.Administrator
* @subpackage com_installer
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Installer\Administrator\View\Manage;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\Pagination\Pagination;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* 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;
/**
* Form object for search filters
*
* @var \Joomla\CMS\Form\Form
*/
public $filterForm;
/**
* The active search filters
*
* @var array
*/
public $activeFilters;
/**
* 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()
{
$toolbar = $this->getDocument()->getToolbar();
$canDo = ContentHelper::getActions('com_installer');
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('icon-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();
if ($canDo->get('core.edit.state')) {
$childBar->publish('manage.publish', 'JTOOLBAR_ENABLE')
->listCheck(true);
$childBar->unpublish('manage.unpublish', 'JTOOLBAR_DISABLE')
->listCheck(true);
}
if ($canDo->get('core.delete')) {
$childBar->delete('manage.remove', 'JTOOLBAR_UNINSTALL')
->message('COM_INSTALLER_CONFIRM_UNINSTALL')
->listCheck(true);
}
$childBar->standardButton('refresh', 'JTOOLBAR_REFRESH_CACHE', 'manage.refresh')
->listCheck(true);
if ($canDo->get('core.manage')) {
$toolbar->linkButton('upload', 'COM_INSTALLER_TOOLBAR_INSTALL_EXTENSIONS')
->url('index.php?option=com_installer&view=install');
$toolbar->linkButton('refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES')
->url('index.php?option=com_installer&view=update');
$toolbar->divider();
}
parent::addToolbar();
$toolbar->help('Extensions:_Manage');
}
}
The same content is in 17 releases, Joomla 5.2.0-beta1 to 5.2.6. See them all, or every version of this file.