Adding views of stacks, manufacturers lists

This commit is contained in:
2023-10-23 21:55:15 +02:00
parent 577a9f680a
commit e4a1d2c078
25 changed files with 1234 additions and 23 deletions

View File

@ -0,0 +1,47 @@
<?php
/**
* @package Depot.Administrator
* @subpackage com_depot
* @author Thomas Kuschel <thomas@kuschel.at>
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
* @license GNU General Public License version 2 or later; see LICENSE.md
* @since 0.9.3
*/
namespace KW4NZ\Component\Depot\Administrator\View\Manufacturers;
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;
use Joomla\CMS\Toolbar\ToolbarHelper;
// use Joomla\CMS\Language\Text;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null)
{
// Get application
$app = Factory::getApplication();
$this->items = $this->get('Items');
// set the toolbar
$this->addToolbar();
parent::display($tpl);
}
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_DEPOT_MANAGER_MANUFACTURERS'));
ToolbarHelper::addNew('manufacturer.add');
ToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'manufacturers.delete');
ToolbarHelper::publish('manufacturers.publish', 'JTOOLBAR_PUBLISH', true);
ToolbarHelper::unpublish('manufacturers.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
}