Property
in package
implements
PropertyInterface
Property descriptior
Table of Contents
Interfaces
- PropertyInterface
- Property interface
Constants
- TYPES = ['text', 'number', 'custom', 'boolean', 'list', 'class', 'password', 'url', 'text-area', 'group', 'oauth', 'language-dropdown', 'image', 'key', 'price', 'file', 'date', 'time', 'time-interval']
- Property type text names
Properties
- $default : mixed|null
- Default value
- $description : string|null
- Property description
- $displayType : string|null
- Display type
- $group : string|null
- Group name
- $help : string|null
- Property help
- $hidden : bool
- Hidden attribute
- $id : string|null
- Property id
- $items : array<string|int, mixed>
- Dropdown items
- $name : string
- Property name
- $readonly : bool
- Readonly attribute
- $required : bool
- Property required atribute
- $title : string|null
- Property title
- $type : int
- Property type
- $value : mixed|null
- Property value
Methods
- __construct() : mixed
- Constructor
- applyData() : void
- Set property object params
- create() : Property|null
- Create property obj from array
- createFromText() : Property|null
- Create property obj from text
- default() : Property
- Set property default
- description() : Property
- Set property description
- displayType() : Property
- Set display type
- getDefault() : mixed|null
- Get property default value.
- getDescription() : string|null
- Get property description
- getGroup() : string|null
- Return property group.
- getHelp() : string|null
- Get property help
- getHidden() : bool
- Get hidden property
- getId() : string|null
- Get property id.
- getItems() : array<string|int, mixed>
- Return property items.
- getName() : string
- Return property name.
- getReadonly() : bool
- Get readonly attribute
- getRequired() : bool
- Return property required attribute.
- getTitle() : string|null
- Return property display name.
- getType() : int|null
- Get property type
- getTypeId() : int|null
- Get type id
- getTypeIndex() : int|null
- Get type index
- getTypeText() : string
- Get property type as text
- getValue() : mixed|null
- Return property value.
- group() : Property
- Set property group
- help() : Property
- Set property help
- hidden() : Property
- Set hidden attribute
- id() : Property
- Set property id
- isGroup() : bool
- Return true if property is group
- isHidden() : bool
- Get hidden attribute
- isReadonly() : bool
- Get readonly attribute
- items() : Property
- Set property items
- name() : Property
- Set property name
- readonly() : Property
- Set readonly attribute
- required() : Property
- Set property required attribute
- title() : Property
- Set property title
- toArray() : array<string|int, mixed>
- Convert to array
- type() : Property
- Set property type
- value() : Property
- Set property value
Constants
TYPES
Property type text names
public
array<string|int, mixed>
TYPES
= ['text', 'number', 'custom', 'boolean', 'list', 'class', 'password', 'url', 'text-area', 'group', 'oauth', 'language-dropdown', 'image', 'key', 'price', 'file', 'date', 'time', 'time-interval']
Properties
$default
Default value
protected
mixed|null
$default
= null
$description
Property description
protected
string|null
$description
= null
$displayType
Display type
protected
string|null
$displayType
= null
$group
Group name
protected
string|null
$group
= null
$help
Property help
protected
string|null
$help
= null
$hidden
Hidden attribute
protected
bool
$hidden
= false
$id
Property id
protected
string|null
$id
= null
$items
Dropdown items
protected
array<string|int, mixed>
$items
= []
$name
Property name
protected
string
$name
$readonly
Readonly attribute
protected
bool
$readonly
= false
$required
Property required atribute
protected
bool
$required
= false
$title
Property title
protected
string|null
$title
= null
$type
Property type
protected
int
$type
= 0
$value
Property value
protected
mixed|null
$value
= null
Methods
__construct()
Constructor
public
__construct(string $name[, array<string|int, mixed>|null $data = null ]) : mixed
Parameters
- $name : string
- $data : array<string|int, mixed>|null = null
applyData()
Set property object params
public
applyData(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
create()
Create property obj from array
public
static create(array<string|int, mixed> $data) : Property|null
Parameters
- $data : array<string|int, mixed>
Return values
Property|nullcreateFromText()
Create property obj from text
public
static createFromText(string $text) : Property|null
Parameters
- $text : string
Return values
Property|nulldefault()
Set property default
public
default(mixed|null $default) : Property
Parameters
- $default : mixed|null
Return values
Propertydescription()
Set property description
public
description(string|null $description) : Property
Parameters
- $description : string|null
Return values
PropertydisplayType()
Set display type
public
displayType(string|null $displayType) : Property
Parameters
- $displayType : string|null
Return values
PropertygetDefault()
Get property default value.
public
getDefault() : mixed|null
Return values
mixed|nullgetDescription()
Get property description
public
getDescription() : string|null
Return values
string|nullgetGroup()
Return property group.
public
getGroup() : string|null
Return values
string|nullgetHelp()
Get property help
public
getHelp() : string|null
Return values
string|nullgetHidden()
Get hidden property
public
getHidden() : bool
Return values
boolgetId()
Get property id.
public
getId() : string|null
Return values
string|nullgetItems()
Return property items.
public
getItems() : array<string|int, mixed>
Return values
array<string|int, mixed>getName()
Return property name.
public
getName() : string
Return values
stringgetReadonly()
Get readonly attribute
public
getReadonly() : bool
Return values
boolgetRequired()
Return property required attribute.
public
getRequired() : bool
Return values
boolgetTitle()
Return property display name.
public
getTitle() : string|null
Return values
string|nullgetType()
Get property type
public
getType() : int|null
Return values
int|nullgetTypeId()
Get type id
public
getTypeId(string|int $type) : int|null
Parameters
- $type : string|int
Return values
int|nullgetTypeIndex()
Get type index
public
static getTypeIndex(string $type) : int|null
Parameters
- $type : string
Return values
int|nullgetTypeText()
Get property type as text
public
getTypeText() : string
Return values
stringgetValue()
Return property value.
public
getValue() : mixed|null
Return values
mixed|nullgroup()
Set property group
public
group(string $name) : Property
Parameters
- $name : string
Return values
Propertyhelp()
Set property help
public
help(string $help) : Property
Parameters
- $help : string
Return values
Propertyhidden()
Set hidden attribute
public
hidden(bool $hidden) : Property
Parameters
- $hidden : bool
Return values
Propertyid()
Set property id
public
id(string $id) : Property
Parameters
- $id : string
Return values
PropertyisGroup()
Return true if property is group
public
isGroup() : bool
Return values
boolisHidden()
Get hidden attribute
public
isHidden() : bool
Return values
boolisReadonly()
Get readonly attribute
public
isReadonly() : bool
Return values
boolitems()
Set property items
public
items(array<string|int, mixed> $items) : Property
Parameters
- $items : array<string|int, mixed>
Return values
Propertyname()
Set property name
public
name(string $name) : Property
Parameters
- $name : string
Return values
Propertyreadonly()
Set readonly attribute
public
readonly(bool $readonly) : Property
Parameters
- $readonly : bool
Return values
Propertyrequired()
Set property required attribute
public
required(bool $required) : Property
Parameters
- $required : bool
Return values
Propertytitle()
Set property title
public
title(string|null $title) : Property
Parameters
- $title : string|null
Return values
PropertytoArray()
Convert to array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>type()
Set property type
public
type(string|int $type) : Property
Parameters
- $type : string|int
Return values
Propertyvalue()
Set property value
public
value(mixed|null $value) : Property
Parameters
- $value : mixed|null