Back to Joomla project (class list)

Class OnGetApiAttributes - list of methods

Event for getting extra data attributes for an API Entity

Extends

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

Method Summary

public
(mixed $name, array $arguments = array())

Constructor.
Parameters
  • string $name The event name.
  • array $arguments The event arguments.
Since
  • 4.0.0
-
  • \BadMethodCallException
Show source code of this method: __construct Source Code

public array
()

The properties to be rendered.
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getAttributes Source Code

public void
(mixed $name, mixed $value)

Set a named attribute to be rendered in the API.
Parameters
  • string $name The name of the property to be rendered in the api
  • mixed $value The value of the named property to be rendered in the api.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: addAttribute Source Code

public void
(array $value)

Set attributes to be rendered in the API.
Parameters
  • array $value An array of key/value pairs for properties to be added to the api.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: addAttributes Source Code

Properties Summary

private array
$attributes
The attributes
Since
  • 4.0.0

Tags Summary

Since
4.0.0