CoreFiles by mySites.guru
list.php32 lines, 688 bytes, from Joomla_5.3.2-Stable-Full_Package.zip
Raw History Compare with 5.3.1
md5
2513f404e56d21e6da76dabf4ca26bba
sha1
8639039c98f4ccec9198444b1632e9bf15c7ff12
sha256
18f98a6a9c7ec79b299fd943a041805062539212fad03d82f771188d55da8c80
<?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\CMS\Layout\FileLayout $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 67 releases, Joomla 5.2.0-alpha1 to 5.4.10. See them all, or every version of this file.