[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/edit/ -> associations.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  use Joomla\CMS\Factory;
  14  use Joomla\CMS\Language\Text;
  15  
  16  $form     = $displayData->getForm();
  17  $options  = array(
  18      'formControl' => $form->getFormControl(),
  19      'hidden'      => (int) ($form->getValue('language', null, '*') === '*'),
  20  );
  21  
  22  // Load JavaScript message titles
  23  Text::script('ERROR');
  24  Text::script('WARNING');
  25  Text::script('NOTICE');
  26  Text::script('MESSAGE');
  27  Text::script('JGLOBAL_ASSOC_NOT_POSSIBLE');
  28  Text::script('JGLOBAL_ASSOCIATIONS_RESET_WARNING');
  29  
  30  /** @var \Joomla\CMS\Document\HtmlDocument $doc */
  31  $doc = Factory::getApplication()->getDocument();
  32  $wa  = $doc->getWebAssetManager();
  33  $wa->getRegistry()->addExtensionRegistryFile('com_associations');
  34  $wa->useScript('com_associations.associations-edit');
  35  $doc->addScriptOptions('system.associations.edit', $options);
  36  
  37  // JLayout for standard handling of associations fields in the administrator items edit screens.
  38  echo $form->renderFieldset('item_associations');


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