[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_categories 6 * 7 * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Factory; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Associations; 16 use Joomla\CMS\Language\Text; 17 use Joomla\CMS\Layout\LayoutHelper; 18 use Joomla\CMS\Router\Route; 19 use Joomla\CMS\Workflow\WorkflowServiceInterface; 20 21 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 22 $wa = $this->document->getWebAssetManager(); 23 $wa->useScript('keepalive') 24 ->useScript('form.validate'); 25 26 $app = Factory::getApplication(); 27 $input = $app->input; 28 29 $assoc = Associations::isEnabled(); 30 // Are associations implemented for this extension? 31 $extensionassoc = array_key_exists('item_associations', $this->form->getFieldsets()); 32 33 // Fieldsets to not automatically render by /layouts/joomla/edit/params.php 34 $this->ignore_fieldsets = ['jmetadata', 'item_associations']; 35 36 $c = Factory::getApplication()->bootComponent($this->state->get('category.extension')); 37 38 if ($c instanceof WorkflowServiceInterface) { 39 $wcontext = $c->getCategoryWorkflowContext($this->state->get('category.section')); 40 41 if (!$c->isWorkflowActive($wcontext)) { 42 $this->ignore_fieldsets[] = 'workflow'; 43 } 44 } 45 46 $this->useCoreUI = true; 47 48 // In case of modal 49 $isModal = $input->get('layout') === 'modal'; 50 $layout = $isModal ? 'modal' : 'edit'; 51 $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : ''; 52 ?> 53 54 <form action="<?php echo Route::_('index.php?option=com_categories&extension=' . $input->getCmd('extension', 'com_content') . '&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" aria-label="<?php echo Text::_('COM_CATEGORIES_FORM_TITLE_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate"> 55 56 <?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?> 57 58 <div class="main-card"> 59 <?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'general', 'recall' => true, 'breakpoint' => 768]); ?> 60 <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('JCATEGORY')); ?> 61 <div class="row"> 62 <div class="col-lg-9"> 63 <?php echo $this->form->getLabel('description'); ?> 64 <?php echo $this->form->getInput('description'); ?> 65 </div> 66 <div class="col-lg-3"> 67 <?php echo LayoutHelper::render('joomla.edit.global', $this); ?> 68 </div> 69 </div> 70 71 <?php echo HTMLHelper::_('uitab.endTab'); ?> 72 73 <?php echo LayoutHelper::render('joomla.edit.params', $this); ?> 74 75 <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING')); ?> 76 <div class="row"> 77 <div class="col-12 col-lg-6"> 78 <fieldset id="fieldset-publishingdata" class="options-form"> 79 <legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend> 80 <div> 81 <?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?> 82 </div> 83 </fieldset> 84 </div> 85 <div class="col-12 col-lg-6"> 86 <fieldset id="fieldset-metadata" class="options-form"> 87 <legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend> 88 <div> 89 <?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?> 90 </div> 91 </fieldset> 92 </div> 93 </div> 94 95 <?php echo HTMLHelper::_('uitab.endTab'); ?> 96 97 <?php if (!$isModal && $assoc && $extensionassoc) : ?> 98 <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'associations', Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?> 99 <fieldset id="fieldset-associations" class="options-form"> 100 <legend><?php echo Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS'); ?></legend> 101 <div> 102 <?php echo LayoutHelper::render('joomla.edit.associations', $this); ?> 103 </div> 104 </fieldset> 105 <?php echo HTMLHelper::_('uitab.endTab'); ?> 106 <?php elseif ($isModal && $assoc && $extensionassoc) : ?> 107 <div class="hidden"><?php echo LayoutHelper::render('joomla.edit.associations', $this); ?></div> 108 <?php endif; ?> 109 110 <?php if ($this->canDo->get('core.admin')) : ?> 111 <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'rules', Text::_('COM_CATEGORIES_FIELDSET_RULES')); ?> 112 <fieldset id="fieldset-rules" class="options-form"> 113 <legend><?php echo Text::_('COM_CATEGORIES_FIELDSET_RULES'); ?></legend> 114 <div> 115 <?php echo $this->form->getInput('rules'); ?> 116 </div> 117 </fieldset> 118 <?php echo HTMLHelper::_('uitab.endTab'); ?> 119 <?php endif; ?> 120 121 <?php echo HTMLHelper::_('uitab.endTabSet'); ?> 122 123 <?php echo $this->form->getInput('extension'); ?> 124 <input type="hidden" name="task" value=""> 125 <input type="hidden" name="return" value="<?php echo $input->getBase64('return'); ?>"> 126 <input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>"> 127 <?php echo HTMLHelper::_('form.token'); ?> 128 </div> 129 </form>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |