CoreFiles by mySites.guru
list.php31 lines, 645 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
2cfcfc20b0360d64e1640b7c5af8226b
sha1
95d29f01be75ead5f883161a92c1ce4aecc0d052
sha256
d0fd9872146116cfa4a442cb0f5a5dcaad96dbbe0876e875273ec39b8f6c54da
<?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;

$fieldValue = $field->value;

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

$fieldValue = (array) $fieldValue;
$texts      = array();
$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 16 releases, Joomla 4.2.0-beta3 to 4.3.0-alpha2. See them all, or every version of this file.