CoreFiles by mySites.guru
list.php32 lines, 711 bytes, from Joomla_6.0.4-Stable-Full_Package.zip
Raw History Compare with 6.0.3
md5
e77da15b2f7e84ab6e1b68e6ebc2807a
sha1
634214199fa390c4ea88a3cc0de6afb86e4a6288
sha256
73c02e60483de333c1ec920b08f41e3e7af9b98e5d1328dd90eebcc242db2182
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.List
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

/** @var \Joomla\Plugin\Fields\ListField\Extension\ListPlugin $this */
$fieldValue = $field->value;

if ($fieldValue == '') {
    return;
}

$fieldValue = (array) $fieldValue;
$texts      = [];
$options    = $this->getOptionsFromField($field);

foreach ($options as $value => $name) {
    if (in_array((string) $value, $fieldValue)) {
        $texts[] = Text::_($name);
    }
}

echo htmlentities(implode(', ', $texts));

The same content is in 50 releases, Joomla 6.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.