Back to Joomla project (class list)

Class JsonApiView - list of methods

Base class for a Joomla Json List View
Class holding methods for displaying presentation data.

Extends

Package: Joomla\CMS\MVC\View
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/MVC/View/JsonApiView.php
Project: Joomla

Method Summary

public
(mixed $config = [])

Constructor.
Parameters
  • 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
Show source code of this method: __construct Source Code

public string
(array $items = null)

Execute and display a template script.
Parameters
  • array|null $items Array of items
Returns
  • string
Since
  • 4.0.0
Show source code of this method: displayList Source Code

public string
(mixed $item = null)

Execute and display a template script.
Parameters
  • object $item Item
Returns
  • string
Since
  • 4.0.0
Show source code of this method: displayItem Source Code

protected object
(mixed $item)

Prepare item before render.
Parameters
  • object $item The model item
Returns
  • object
Since
  • 4.0.0
Show source code of this method: prepareItem Source Code

protected string
(mixed $query)

Encode square brackets in the URI query, according to JSON API specification.
Parameters
  • string $query The URI query
Returns
  • string
Since
  • 4.0.0
Show source code of this method: queryEncode Source Code

Properties Summary

public \Joomla\CMS\Document\JsonapiDocument
$document
The active document object (Redeclared for typehinting)
Since
  • 3.0
protected string
$type
The content type
protected array
$relationship
Item relationship
Since
  • 4.0.0
protected \Tobscure\JsonApi\AbstractSerializer
$serializer
Serializer data
Since
  • 4.0.0
protected array
$fieldsToRenderItem
The fields to render item in the documents
Since
  • 4.0.0
protected array
$fieldsToRenderList
The fields to render items in the documents
Since
  • 4.0.0

Tags Summary

Since
4.0.0