JoomlaSerializer
Extends AbstractSerializerThis 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
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
__construct
Constructor.
__construct( type) :
since |
4.0.0 |
---|
Arguments
- type
string
The content type to be loaded
Response
mixed
getAttributes
Get the attributes array.
getAttributes(array|\stdClass|\Joomla\CMS\Object\CMSObject post, array|null fields = null) : mixed||string|int
since |
4.0.0 |
---|
Arguments
- post
array<string|int, mixed>|stdClass|CMSObject
The data container- fields
array<string|int, mixed>|null
The requested fields to be rendered
Response
array<string|int, mixed>
getRelationship
Get a relationship.
getRelationship( model, name) : \Tobscure\JsonApi\Relationship|null
since |
4.0.0 |
---|
Arguments
- model
mixed
The model of the entity being rendered- name
string
The name of the relationship to return
Response
Relationship|null