LinkRestConvertible extends Link, RestConvertible, PopupDataAggregatable
Table of Contents
Methods
- getPopupData() : PopupData
- Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
- getRestEntityName() : string
- Returns the name of the entity that will be used in the rest response
- setMessageInfo() : static
- Associates the entity with the passed message by filling in the messageId, chatId and authorId
- toRestFormat() : array<string|int, mixed>|null
- Returns an array in JSON like format to return the entity as a rest response.
- toRestFormatIdOnly() : array<string|int, mixed>
- Returns an array containing the id of the link and the id of the linked entity, or an array of such arrays
Methods
getPopupData()
Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
public
getPopupData([array<string|int, string> $excludedList = [] ]) : PopupData
Parameters
- $excludedList : array<string|int, string> = []
Tags
Return values
PopupDatagetRestEntityName()
Returns the name of the entity that will be used in the rest response
public
static getRestEntityName() : string
Return values
stringsetMessageInfo()
Associates the entity with the passed message by filling in the messageId, chatId and authorId
public
setMessageInfo(Message $message) : static
Parameters
- $message : Message
Return values
statictoRestFormat()
Returns an array in JSON like format to return the entity as a rest response.
public
toRestFormat([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>|null
Parameters
- $option : array<string|int, mixed> = []
Return values
array<string|int, mixed>|nulltoRestFormatIdOnly()
Returns an array containing the id of the link and the id of the linked entity, or an array of such arrays
public
toRestFormatIdOnly() : array<string|int, mixed>