Back to Joomla project (class list)

Class JoomlaSerializer - list of methods

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
Package: Joomla\CMS\Serializer
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Serializer/JoomlaSerializer.php
Project: Joomla

Method Summary

public
(string $type)

Constructor.
Parameters
  • string $type The content type to be loaded
Since
  • 4.0.0
Show source code of this method: __construct Source Code

public array
(mixed $post, array $fields = null)

Get the attributes array.
Parameters
  • array|\stdClass|\Joomla\CMS\Object\CMSObject $post The data container
  • array|null $fields The requested fields to be rendered
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getAttributes Source Code

public \Tobscure\JsonApi\Relationship|void
(mixed $model, mixed $name)

Get a relationship.
Parameters
  • mixed $model The model of the entity being rendered
  • string $name The name of the relationship to return
Returns
  • \Tobscure\JsonApi\Relationship|void
Since
  • 4.0.0
Show source code of this method: getRelationship Source Code

Tags Summary

Since
4.0.0