Options
trait Options
Options table trait
Methods
string|null
getOptionTypeClass()
Get option type model class
string|null
getOptionsDefinitionClass()
Get optins definition model class
mixed
getValAttribute()
Mutator (get) for value attribute.
mixed
type()
Option type relation
Model|false
createOption(integer|null $referenceId, string|integer $key, mixed $value = null)
Create option
bool
createOptions(integer $referenceId, string $typeName, string|null $branch = null)
Create options
Model|false
getOptionType(string|integer $key)
Get option type
mixed
getOptionValue(string $key, mixed $referenceId = null, mixed $default = null)
Get option value
QueryBuilder
getOptionsQuery($referenceId, array $onlyKeys = null)
Get options query
Model|null
getOptions($referenceId, array|null $onlyKeys = null)
Get options list
bool
hasOption($key, $referenceId = null)
Return true if option name exist
boolean
saveOption(integer $referenceId, string $key, mixed $value)
Save option
boolean
saveOptions(integer $referenceId, array $data)
Save options
Details
at line 25
string|null
getOptionTypeClass()
Get option type model class
at line 35
string|null
getOptionsDefinitionClass()
Get optins definition model class
at line 45
mixed
getValAttribute()
Mutator (get) for value attribute.
at line 55
mixed
type()
Option type relation
at line 73
Model|false
createOption(integer|null $referenceId, string|integer $key, mixed $value = null)
Create option
at line 103
bool
createOptions(integer $referenceId, string $typeName, string|null $branch = null)
Create options
at line 124
Model|false
getOptionType(string|integer $key)
Get option type
at line 149
Model|false
getOption($key, $referenceId = null)
Get option
at line 172
mixed
getOptionValue(string $key, mixed $referenceId = null, mixed $default = null)
Get option value
at line 186
QueryBuilder
getOptionsQuery($referenceId, array $onlyKeys = null)
Get options query
at line 200
Model|null
getOptions($referenceId, array|null $onlyKeys = null)
Get options list
at line 212
bool
hasOption($key, $referenceId = null)
Return true if option name exist
at line 227
boolean
saveOption(integer $referenceId, string $key, mixed $value)
Save option
at line 249
boolean
saveOptions(integer $referenceId, array $data)
Save options