CoreFiles by mySites.guru
checkboxes.php30 lines, 660 bytes, from Joomla_3.10.0-alpha4-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha3
md5
ce20b02cee6eae89b823b85e3bcab833
sha1
879f4d49999533fa79bc9e8f763c5c8894214fee
sha256
4acc14352808292a4f884fe8091cf773f7f40a7df191aea0c13c7b676a5cfa8e
<?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 8 releases, Joomla 3.10.0-alpha4 to 3.10.0-rc2. See them all, or every version of this file.