CoreFiles by mySites.guru
checkboxes.php30 lines, 630 bytes, from Joomla_3.10.0-Stable-Full_Package.zip
Raw History Compare with 3.9.28
md5
f05a8636ec92edb6921af8b0fa99a6e7
sha1
5d86dee2923398cade74c40794219459844f5323
sha256
343bc7372d285b148b4edc71f2ea1c8180f1fcbd7ab611040c859813686fa478
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @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;

$fieldValue = $field->value;

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

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

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

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

The same content is in 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.