Arikaim CMS

Options

Options table trait

Table of Contents

Methods

createOption()  : Model|null
Create option
getOption()  : Model|null
Get option
getOptions()  : Model|null
Get options list
getOptionsQuery()  : QueryBuilder
Get options query
getOptionType()  : Model|null
Get option type
getOptionTypeClass()  : string|null
Get option type model class
getOptionValue()  : mixed
Get option value
getValAttribute()  : mixed
Mutator (get) for value attribute.
hasOption()  : bool
Return true if option name exist
saveOption()  : bool
Save option
saveOptions()  : bool
Save options
type()  : Relation|null
Option type relation

Methods

createOption()

Create option

public createOption(int|null $referenceId, string $key[, mixed $value = null ]) : Model|null
Parameters
$referenceId : int|null
$key : string

Option type key

$value : mixed = null
Return values
Model|null

getOption()

Get option

public getOption(string $key[, int|null $referenceId = null ]) : Model|null
Parameters
$key : string

Option type key

$referenceId : int|null = null
Return values
Model|null

getOptions()

Get options list

public getOptions(int|null $referenceId[, array<string|int, mixed>|null $keys = null ]) : Model|null
Parameters
$referenceId : int|null
$keys : array<string|int, mixed>|null = null
Return values
Model|null

getOptionsQuery()

Get options query

public getOptionsQuery(int|null $referenceId[, array<string|int, mixed>|null $keys = null ]) : QueryBuilder
Parameters
$referenceId : int|null
$keys : array<string|int, mixed>|null = null
Return values
QueryBuilder

getOptionType()

Get option type

public getOptionType(string $key) : Model|null
Parameters
$key : string

Type key

Return values
Model|null

getOptionTypeClass()

Get option type model class

public getOptionTypeClass() : string|null
Return values
string|null

getOptionValue()

Get option value

public getOptionValue(string $key[, int|null $referenceId = null ][, mixed $default = null ]) : mixed
Parameters
$key : string
$referenceId : int|null = null
$default : mixed = null

getValAttribute()

Mutator (get) for value attribute.

public getValAttribute() : mixed

hasOption()

Return true if option name exist

public hasOption(string $key[, int|null $referenceId = null ]) : bool
Parameters
$key : string
$referenceId : int|null = null
Return values
bool

saveOption()

Save option

public saveOption(int $referenceId, string $key, mixed $value) : bool
Parameters
$referenceId : int
$key : string
$value : mixed
Return values
bool

saveOptions()

Save options

public saveOptions(int $referenceId, array<string|int, mixed> $data) : bool
Parameters
$referenceId : int
$data : array<string|int, mixed>
Return values
bool

type()

Option type relation

public type() : Relation|null
Return values
Relation|null

        
On this page

Search results