[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/edit/ -> publishingdata.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   6   *
   7   * @copyright   (C) 2013 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  $form = $displayData->getForm();
  14  
  15  $fields = $displayData->get('fields') ?: array(
  16      'publish_up',
  17      'publish_down',
  18      'featured_up',
  19      'featured_down',
  20      array('created', 'created_time'),
  21      array('created_by', 'created_user_id'),
  22      'created_by_alias',
  23      array('modified', 'modified_time'),
  24      array('modified_by', 'modified_user_id'),
  25      'version',
  26      'hits',
  27      'id'
  28  );
  29  
  30  $hiddenFields = $displayData->get('hidden_fields') ?: array();
  31  
  32  foreach ($fields as $field) {
  33      foreach ((array) $field as $f) {
  34          if ($form->getField($f)) {
  35              if (in_array($f, $hiddenFields)) {
  36                  $form->setFieldAttribute($f, 'type', 'hidden');
  37              }
  38  
  39              echo $form->renderField($f);
  40              break;
  41          }
  42      }
  43  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer