CoreFiles by mySites.guru
repeatable.php36 lines, 575 bytes, from Joomla_3.10.12-Stable-Full_Package.zip
Raw History Compare with 3.10.11
md5
f3353a490a5db8325ee806a81f1a6e79
sha1
79f696e3f96832140cca45758bcde8fbfc18f196
sha256
3c987f334c3edeea6cae4d80c4bc3ff95885eb1690139f98f4f6d6b56753a986
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Repeatable
 *
 * @copyright   (C) 2018 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 === '')
{
	return;
}

// Get the values
$fieldValues = json_decode($fieldValue, true);

if (empty($fieldValues))
{
	return;
}

$html = '<ul>';

foreach ($fieldValues as $value)
{
	$html .= '<li>' . implode(', ', $value) . '</li>';
}

$html .= '</ul>';

echo $html;

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.