Файловый менеджер - Редактировать - /var/www/html/administrator/components/com_kunena/src/View/Category/HtmlView.php
Ðазад
<?php /** * Kunena Component * * @package Kunena.Administrator * @subpackage Views * * @copyright Copyright (C) 2008 - 2026 Kunena Team. All rights reserved. * @license https://www.gnu.org/copyleft/gpl.html GNU/GPL * @link https://www.kunena.org **/ namespace Kunena\Forum\Administrator\View\Category; \defined('_JEXEC') or die(); use Exception; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Object\CMSObject; use Joomla\CMS\Factory; use Joomla\CMS\Toolbar\ToolbarFactoryInterface; use Joomla\CMS\Toolbar\ToolbarHelper; use Kunena\Forum\Libraries\Forum\Category\KunenaCategory; /** * About view for Kunena backend * * @since Kunena 6.0 */ class HtmlView extends BaseHtmlView { /** * @var array|KunenaCategory[] * @since Kunena 6.0 */ public $category = []; public $options; /** * The model state * * @var CMSObject * @since 6.0 */ protected $state; /** * @return void * * @since Kunena 6.0 * @throws Exception */ public function displayCreate(): void { $this->displayEdit(); } /** * @return void * @since Kunena * * * @throws Exception */ public function displayEdit() { $model = $this->getModel(); $this->category = $model->getAdminCategory(); // FIXME: better access control and gracefully handle no rights // Prevent fatal error if no rights: if (!$this->category) { return; } $this->options = $model->getAdminOptions(); $this->moderators = $model->getAdminModerators(); $this->setToolBarEdit(); $this->display(); } /** * @return void * @since Kunena */ protected function setToolBarEdit() { $model = $this->getModel(); $this->category = $model->getAdminCategory(); // Get the toolbar object instance $this->bar = Factory::getContainer()->get(ToolbarFactoryInterface::class)->createToolbar('toolbar'); ToolbarHelper::title(Text::_('COM_KUNENA') . ': ' . Text::_('COM_KUNENA_CATEGORY_MANAGER'), 'list-view'); ToolbarHelper::spacer(); ToolbarHelper::apply(); ToolbarHelper::save(); ToolbarHelper::save2new(); // If an existing item, can save to a copy. if ($this->category->exists()) { ToolbarHelper::save2copy(); } ToolbarHelper::cancel(); ToolbarHelper::spacer(); $helpUrl = 'https://docs.kunena.org/en/manual/backend/categories/new-section-category'; ToolbarHelper::help('COM_KUNENA', false, $helpUrl); } /** * @param null $tpl tmpl * * @return void * * @since Kunena 6.0 * * @throws Exception */ public function display($tpl = null) { $model = $this->getModel(); $this->category = $model->getAdminCategory(); $this->state = $model->getState(); // FIXME: better access control and gracefully handle no rights // Prevent fatal error if no rights: if (!$this->category) { return; } $this->options = $model->getAdminOptions(); $this->moderators = $model->getAdminModerators(); $this->addToolbar(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since Kunena 6.0 */ protected function addToolbar(): void { $model = $this->getModel(); $this->category = $model->getAdminCategory(); ToolbarHelper::title(Text::_('COM_KUNENA') . ': ' . Text::_('COM_KUNENA_CATEGORY_MANAGER'), 'list-view'); ToolbarHelper::spacer(); ToolbarHelper::apply('category.apply'); ToolbarHelper::save('category.save'); ToolbarHelper::save2new('category.save2newcategory'); // If an existing item, can save to a copy. if ($this->category->exists()) { ToolbarHelper::save2copy('category.save2copycategory'); } ToolbarHelper::cancel('category.cancel'); ToolbarHelper::spacer(); $helpUrl = 'https://docs.kunena.org/en/manual/backend/categories/new-section-category'; ToolbarHelper::help('COM_KUNENA', false, $helpUrl); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка