[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Serializer/ -> JoomlaSerializer.php (summary)

Joomla! Content Management System

Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 115 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JoomlaSerializer:: (3 methods):
  __construct()
  getAttributes()
  getRelationship()


Class: JoomlaSerializer  - X-Ref

This class does the messy job of sanitising all the classes Joomla has that contain data and converting them
into a standard array that can be consumed by the Tobscure library. It also throws appropriate plugin events
to allow 3rd party extensions to add custom data and relations into these properties before they are rendered

__construct(string $type)   X-Ref
Constructor.

param: string  $type  The content type to be loaded

getAttributes($post, array $fields = null)   X-Ref
Get the attributes array.

param: array|\stdClass|CMSObject  $post    The data container
param: array|null                 $fields  The requested fields to be rendered
return: array

getRelationship($model, $name)   X-Ref
Get a relationship.

param: mixed   $model  The model of the entity being rendered
param: string  $name   The name of the relationship to return
return: \Tobscure\JsonApi\Relationship|void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer