- md5
- f91c47bafb7a34869eb7aa817709b0c2
- sha1
- 6d41bfc2869c603b2819d43dd60e159fe5b0c23b
- sha256
- 2b8179a9c53c89b2fa0c6b10bf57c0e008d38273a7070add40c2cb589184a1ba
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
<?php
/**
* @package Joomla.Administrator
* @subpackage com_banners
*
* @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\Banners\Administrator\View\Banners;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\View\ListView;
use Joomla\Component\Banners\Administrator\Model\BannersModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* View class for a list of banners.
*
* @since 1.6
*/
class HtmlView extends ListView
{
/**
* Category data
*
* @var array
* @since 1.6
*/
protected $categories = [];
/**
* The help link for the view
*
* @var string
*/
protected $helpLink = 'Banners';
/**
* Constructor
*
* @param array $config An optional associative array of configuration settings.
*
* @since 6.0.0
*/
public function __construct(array $config)
{
if (empty($config['option'])) {
$config['option'] = 'com_banners';
}
$config['toolbar_icon'] = 'bookmark banners';
$config['supports_batch'] = true;
$config['category'] = 'com_banners';
parent::__construct($config);
}
/**
* Prepare view data
*
* @return void
*
* @since 6.0.0
*/
protected function initializeView()
{
parent::initializeView();
/** @var BannersModel $model */
$model = $this->getModel();
$this->categories = $model->getCategoryOrders();
$this->canDo = ContentHelper::getActions('com_banners', 'category', $this->state->get('filter.category_id'));
// We do not need to filter by language when multilingual is disabled
if (!Multilanguage::isEnabled()) {
unset($this->activeFilters['language']);
$this->filterForm->removeField('language', 'filter');
}
// Add form control fields
$this->filterForm
->addControlField('task', '')
->addControlField('boxchecked', '0');
}
}
No other release has this exact content. See every version of this file.