CoreFiles by mySites.guru
JsonapiView.php82 lines, 1,340 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
c60a9b5ae32777ac6e241f8c5133d218
sha1
1a2853e4d34a1c6d1ffb9d53454d95175f2d5115
sha256
ea6b32210004da01d2a52a51955261bc65d6feba9438a831bfba5d9a565568c4
<?php
/**
 * @package     Joomla.API
 * @subpackage  com_plugins
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Plugins\Api\View\Plugins;

defined('_JEXEC') or die;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

/**
 * The plugins view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
	/**
	 * The fields to render item in the documents
	 *
	 * @var  array
	 * @since  4.0.0
	 */
	protected $fieldsToRenderItem = [
		'id',
		'name',
		'type',
		'element',
		'changelogurl',
		'folder',
		'client_id',
		'enabled',
		'access',
		'protected',
		'checked_out',
		'checked_out_time',
		'ordering',
		'state',
	];

	/**
	 * The fields to render items in the documents
	 *
	 * @var  array
	 * @since  4.0.0
	 */
	protected $fieldsToRenderList = [
		'id',
		'name',
		'element',
		'folder',
		'checked_out',
		'checked_out_time',
		'enabled',
		'access',
		'ordering',
		'editor',
		'access_level',
	];

	/**
	 * Prepare item before render.
	 *
	 * @param   object  $item  The model item
	 *
	 * @return  object
	 *
	 * @since   4.0.0
	 */
	protected function prepareItem($item)
	{
		$item->id = $item->extension_id;
		unset($item->extension_id);

		return $item;
	}
}

No other release has this exact content. See every version of this file.