CoreFiles by mySites.guru
checkboxes.php30 lines, 643 bytes, from Joomla_3.9.21-Stable-Full_Package.zip
Raw History Compare with 3.9.20
md5
185e032bcf23c44fa6435538ef71ee1d
sha1
68fe3de9c74ca0ab67f29f7f1c689d0a1b409e59
sha256
431ea162ccd41aacccf0ab28361b16624b263dfcc96a5d1755eb66ceff2743a9
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @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 30 releases, Joomla 3.9.15-rc to 3.10.0-alpha1. See them all, or every version of this file.