CoreFiles by mySites.guru
list.php46 lines, 1,024 bytes, from Joomla_4.0.0-alpha9-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha8
md5
5bf6febb83cb86806af1db754eeaaaa9
sha1
b4cdfa34e8b0a6c984f93663a8026c6045a5e899
sha256
5c78ec0711b2c6403fb100961ccd65e9dc50b0d75b1d0a8061ea88d2faa52a9b
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.List
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Fields list Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsList extends \Joomla\Component\Fields\Administrator\Plugin\FieldsListPlugin
{
	/**
	 * Prepares the field
	 *
	 * @param   string    $context  The context.
	 * @param   stdclass  $item     The item.
	 * @param   stdclass  $field    The field.
	 *
	 * @return  object
	 *
	 * @since   3.9.2
	 */
	public function onCustomFieldsPrepareField($context, $item, $field)
	{
		// Check if the field should be processed
		if (!$this->isTypeSupported($field->type))
		{
			return;
		}

		// The field's rawvalue should be an array
		if (!is_array($field->rawvalue))
		{
			$field->rawvalue = (array) $field->rawvalue;
		}

		return parent::onCustomFieldsPrepareField($context, $item, $field);
	}
}

The same content is in 3 releases, Joomla 4.0.0-alpha9 to 4.0.0-alpha11. See them all, or every version of this file.