Preset implements RestConvertible
Table of Contents
Interfaces
Constants
- BIND_GENERAL = 'toGeneral'
- BIND_NOTIFY = 'toNotify'
Properties
Methods
- bindToUser() : Result
- getDefaultPreset() : Preset
- getId() : int|null
- getInstance() : Preset
- getName() : string|null
- getPersonal() : Preset
- getPersonalUserId() : int|null
- getRestEntityName() : string
- Returns the name of the entity that will be used in the rest response
- getSort() : int|null
- initPersonal() : Preset
- isExist() : bool
- isPersonal() : bool
- load() : Result
- toRestFormat() : array<string|int, mixed>|null
- Returns an array in JSON like format to return the entity as a rest response.
Constants
BIND_GENERAL
public
mixed
BIND_GENERAL
= 'toGeneral'
BIND_NOTIFY
public
mixed
BIND_NOTIFY
= 'toNotify'
Properties
$general
public
General|null
$general
= null
$notify
public
Notify|null
$notify
= null
Methods
bindToUser()
public
bindToUser(int $userId, array<string|int, mixed> $bindingConfiguration) : Result
Parameters
- $userId : int
- $bindingConfiguration : array<string|int, mixed>
Tags
Return values
ResultgetDefaultPreset()
public
static getDefaultPreset() : Preset
Return values
PresetgetId()
public
getId() : int|null
Return values
int|nullgetInstance()
public
static getInstance([int|null $id = null ]) : Preset
Parameters
- $id : int|null = null
Return values
PresetgetName()
public
getName() : string|null
Return values
string|nullgetPersonal()
public
static getPersonal(int $userId) : Preset
Parameters
- $userId : int
Return values
PresetgetPersonalUserId()
public
getPersonalUserId() : int|null
Return values
int|nullgetRestEntityName()
Returns the name of the entity that will be used in the rest response
public
static getRestEntityName() : string
Return values
stringgetSort()
public
getSort() : int|null
Return values
int|nullinitPersonal()
public
initPersonal(int $userId) : Preset
Parameters
- $userId : int
Return values
PresetisExist()
public
isExist() : bool
Return values
boolisPersonal()
public
isPersonal(int $userId) : bool
Parameters
- $userId : int
Return values
boolload()
public
load(int $presetId) : Result
Parameters
- $presetId : int
Return values
ResulttoRestFormat()
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> = []