CoreFiles by mySites.guru
radio.php32 lines, 684 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
d97d464f4b5cc14f273900fcf5419eff
sha1
63aceaec043aa85b595351beea47cbfcb5c840e5
sha256
28748ee6d9ad9fddbfb59270815243902c813f473f6b1d008abdc57664084309
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Radio
 *
 * @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 */
$value = $field->value;

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

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

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

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.