[ 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_menus 6 * 7 * @copyright (C) 2016 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\Component\ComponentHelper; 14 use Joomla\CMS\Factory; 15 16 $app = Factory::getApplication(); 17 $form = $displayData->getForm(); 18 $input = $app->input; 19 $component = $input->getCmd('option', 'com_content'); 20 21 if ($component == 'com_categories') { 22 $extension = $input->getCmd('extension', 'com_content'); 23 $parts = explode('.', $extension); 24 $component = $parts[0]; 25 } 26 27 $saveHistory = ComponentHelper::getParams($component)->get('save_history', 0); 28 29 $fields = $displayData->get('fields') ?: array( 30 array('parent', 'parent_id'), 31 array('published', 'state', 'enabled'), 32 array('category', 'catid'), 33 'featured', 34 'sticky', 35 'access', 36 'language', 37 'tags', 38 'note', 39 'version_note', 40 ); 41 42 $hiddenFields = $displayData->get('hidden_fields') ?: array(); 43 44 if (!$saveHistory) { 45 $hiddenFields[] = 'version_note'; 46 } 47 48 $html = array(); 49 $html[] = '<fieldset><ul class="list-unstyled">'; 50 51 foreach ($fields as $field) { 52 $field = is_array($field) ? $field : array($field); 53 54 foreach ($field as $f) { 55 if ($form->getField($f)) { 56 if (in_array($f, $hiddenFields)) { 57 $form->setFieldAttribute($f, 'type', 'hidden'); 58 } 59 60 $html[] = '<li>' . $form->renderField($f) . '</li>'; 61 break; 62 } 63 } 64 } 65 66 $html[] = '</ul></fieldset>'; 67 68 echo implode('', $html);
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 |