TypePreset implements JsonSerializable
Table of Contents
Interfaces
- JsonSerializable
Methods
- __construct() : mixed
- TypePreset constructor.
- createFromJson() : TypePreset|null
- Creates new preset from json string.
- getCategory() : string
- Return category code of the preset.
- getData() : array<string|int, mixed>
- Return data of the preset, containing settings for creating new dynamic type.
- getDescription() : string|null
- Get description of the preset.
- getIcon() : string
- Get path to the icon of the preset.
- getId() : string
- Return identifier of this preset.
- getTitle() : string
- Return title of the preset.
- isDisabled() : bool
- Return disabled status of this preset.
- jsonSerialize() : array<string|int, mixed>
- Prepares data for json.
- setCategory() : $this
- Set category code of the preset.
- setData() : $this
- Return data of the preset, containing settings for creating new dynamic type.
- setDescription() : $this
- Set description of the preset.
- setDisabled() : $this
- Set disabled status of this preset
- setIcon() : $this
- Set path to the icon of the preset.
- setId() : $this
- Set identifier of this preset
- setTitle() : $this
- Set title of the preset.
Methods
__construct()
TypePreset constructor.
public
__construct(array<string|int, mixed> $fields, array<string|int, mixed> $data) : mixed
Parameters
- $fields : array<string|int, mixed>
- $data : array<string|int, mixed>
Tags
createFromJson()
Creates new preset from json string.
public
static createFromJson(string $json) : TypePreset|null
Parameters
- $json : string
Return values
TypePreset|nullgetCategory()
Return category code of the preset.
public
getCategory() : string
Return values
stringgetData()
Return data of the preset, containing settings for creating new dynamic type.
public
getData() : array<string|int, mixed>
Return values
array<string|int, mixed>getDescription()
Get description of the preset.
public
getDescription() : string|null
Return values
string|nullgetIcon()
Get path to the icon of the preset.
public
getIcon() : string
Return values
stringgetId()
Return identifier of this preset.
public
getId() : string
Return values
stringgetTitle()
Return title of the preset.
public
getTitle() : string
Return values
stringisDisabled()
Return disabled status of this preset.
public
isDisabled() : bool
Return values
booljsonSerialize()
Prepares data for json.
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>setCategory()
Set category code of the preset.
public
setCategory(string $category) : $this
Parameters
- $category : string
Return values
$thissetData()
Return data of the preset, containing settings for creating new dynamic type.
public
setData(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
Return values
$thissetDescription()
Set description of the preset.
public
setDescription(string $description) : $this
Parameters
- $description : string
Return values
$thissetDisabled()
Set disabled status of this preset
public
setDisabled(bool $isDisabled) : $this
Parameters
- $isDisabled : bool
Return values
$thissetIcon()
Set path to the icon of the preset.
public
setIcon(string $icon) : $this
Parameters
- $icon : string
Return values
$thissetId()
Set identifier of this preset
public
setId(string $id) : $this
Parameters
- $id : string
Tags
Return values
$thissetTitle()
Set title of the preset.
public
setTitle(string $title) : $this
Parameters
- $title : string