- md5
- fd19996f72272ad8f22753024c5e2dec
- sha1
- d2673273ad68846ca0eb9692481f22da60ed68cd
- sha256
- 1c7070ca441c7f85c6bcfb0a11b66960d152753c305abd09883e2753a717116f
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
<?php
/**
* @package Joomla.API
* @subpackage com_languages
*
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Languages\Api\View\Languages;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
/**
* The languages 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',
'asset_id',
'lang_code',
'title',
'title_native',
'sef',
'image',
'description',
'metakey',
'metadesc',
'sitename',
'published',
'access',
'ordering',
'access_level',
'home',
];
/**
* The fields to render items in the documents
*
* @var array
* @since 4.0.0
*/
protected $fieldsToRenderList = [
'id',
'asset_id',
'lang_code',
'title',
'title_native',
'sef',
'image',
'description',
'metakey',
'metadesc',
'sitename',
'published',
'access',
'ordering',
'access_level',
'home',
];
/**
* Prepare item before render.
*
* @param object $item The model item
*
* @return object
*
* @since 4.0.0
*/
protected function prepareItem($item)
{
$item->id = $item->lang_id;
unset($item->lang->id);
return parent::prepareItem($item);
}
}
The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.