Release of v5.2.0

This commit is contained in:
Robot committed 2026-10-08 15:29:06 +00:00
1 parent 78716895d6
commit f7def5f4fb
1451 files changed
+220555 -79875

No files matched your search

@@ -16,6 +16,7 @@ defined('_JCB_TEMPLATE') or die;
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\View\###Views###;
###API_VIEWS_JSON_HEADER###
use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\Serializer\###View###Serializer;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -27,4 +28,68 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\View\###V
*/
class JsonapiView extends BaseApiView
{
/**
* The fields to render items in the documents
*
* @var array
* @since 4.0.0
*/
protected $fieldsToRenderList = [###API_VIEWS_JSON_FIELDS###
];
/**
* The relationships the items have
*
* @var array
* @since 4.0.0
*/
protected $relationship = [###API_VIEWS_JSON_RELATIONSHIP###
];
/**
* Constructor.
*
* @param array $config A named configuration array for object construction.
* contentType: the name (optional) of the content type to use for the serialization
*
* @since 4.0.0
*/
public function __construct($config = [])
{
if (\array_key_exists('contentType', $config))
{
$this->serializer = new ###View###Serializer($config['contentType']);
}
parent::__construct($config);
}
/**
* Execute and display a template script.
*
* @param ?array $items Array of items
*
* @return string
*
* @since 4.0.0
*/
public function displayList(?array $items = null)
{###API_VIEWS_JSON_PERMISSIONS###
return parent::displayList($items);
}
/**
* Prepare item before render.
*
* @param object $item The model item
*
* @return object
*
* @since 4.0.0
*/
protected function prepareItem($item)
{###API_VIEWS_JSON_PREPAREITEM###
return parent::prepareItem($item);
}
}