[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/MVC/View/Event/ -> OnGetApiFields.php (summary)

Joomla! Content Management System

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

Defines 8 functions

  __construct()
  setType()
  setFields()
  setRelations()
  addFields()
  addRelations()
  getAllPropertiesToRender()
  getAllRelationsToRender()

Functions
Functions that are not part of a class:

__construct($name, array $arguments = array()   X-Ref
Constructor.

Mandatory arguments:
type         string          The type of the field. Should be a constant from static::VIEW_TYPE
fields       fields          The list of fields that will be rendered in the API.

param: string  $name       The event name.
param: array   $arguments  The event arguments.

setType($value)   X-Ref
Setter for the type argument

param: integer  $value  The constant from VIEW_TYPE
return: mixed

setFields($value)   X-Ref
Setter for the fields argument

param: mixed  $value  The value to set
return: array

setRelations($value)   X-Ref
Setter for the relations argument

param: mixed  $value  The value to set
return: array

addFields(array $fields)   X-Ref
Allows the user to add names of properties that will be interpreted as relations
Note that if there is an existing data property it will also be displayed as well
as the relation due to the internal implementation (this behaviour is not part of this API
however and should not be guaranteed)

param: string[]  $fields  The array of additional fields to add to the data of the attribute
return: void

addRelations(array $fields)   X-Ref
Allows the user to add names of properties that will be interpreted as relations
Note that if there is an existing data property it will also be displayed as well
as the relation due to the internal implementation (this behaviour is not part of this API
however and should not be guaranteed)

param: string[]  $fields  The array of additional fields to add as relations
return: void

getAllPropertiesToRender()   X-Ref
Get properties to render.

return: array

getAllRelationsToRender()   X-Ref
Get properties to render.

return: array



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