Documentation

Relation extends Field

Table of Contents

$type  : string
$allowed  : bool
$container  : Container
$isAdd  : bool
$isDelete  : bool
$isSingle  : bool
$isUpdate  : bool
$name  : string
$options  : array<string|int, mixed>
$optionsRequestCallback  : Closure
$RelatedTypeClass  : string
$required  : bool
$resolveCallback  : string|callable|Closure
$resolveParams  : array<string|int, mixed>
$resolveSaveCallback  : string|callable|Closure
$validator  : Validator|null
addsItems()  : Relation
allowed()  : Field
allowed()  :
clone()  : Relation
container()  : void
created()  : void
deletesItems()  : Relation
getName()  : string
getOptions()  : array<string|int, mixed>
getRelatedTypeClass()  : string
getRelatedTypeInstance()  : Type
getResolve()  : Closure|null
getResolveParam()  : mixed
getResolveParams()  : array<string|int, mixed>
getSaveResolve()  : Closure|null
getSchemaJson()  : array<string|int, mixed>
hasResolveParam()  : bool
hasResolver()  : bool
hasSaveResolver()  : bool
isAllowed()  : bool
isRequired()  : bool
isSingle()  : bool
name()  :
name()  : Field
options()  : Field
optionsRequest()  : mixed
relatedTypeClass()  : Relation
required()  : Field
required()  :
resolve()  : Field
resolve()  :
resolveParam()  :
resolveParam()  : Field
resolveParams()  : Field
resolveParams()  :
resolveSave()  : Field
resolveSave()  :
shallAddItems()  : bool
shallDeleteItems()  : bool
shallUpdateItems()  : bool
toSchemaJson()  : array<string|int, mixed>
updatesItems()  : Relation
validate()  :
validate()  : Field
validator()  :
validator()  : Field

Properties

$type

public static string $type

$allowed

protected bool $allowed = false

$isDelete

protected bool $isDelete = false

$isSingle

protected bool $isSingle = false

$isUpdate

protected bool $isUpdate = false

$name

protected string $name

$options

protected array<string|int, mixed> $options = []

$optionsRequestCallback

protected Closure $optionsRequestCallback

$RelatedTypeClass

protected string $RelatedTypeClass

$required

protected bool $required = false

$resolveCallback

protected string|callable|Closure $resolveCallback = null

$resolveParams

protected array<string|int, mixed> $resolveParams = []

$resolveSaveCallback

protected string|callable|Closure $resolveSaveCallback = null

Methods

addsItems()

public addsItems([bool $adds = true ]) : Relation
Parameters
$adds : bool = true
Return values
Relation

allowed()

public allowed(bool $allowed) : Field
Parameters
$allowed : bool
Return values
Field

allowed()

public allowed() :
Return values

deletesItems()

public deletesItems([bool $deletes = true ]) : Relation
Parameters
$deletes : bool = true
Return values
Relation

getName()

public getName() : string
Return values
string

getOptions()

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRelatedTypeClass()

public getRelatedTypeClass() : string
Return values
string

getRelatedTypeInstance()

public getRelatedTypeInstance() : Type
Return values
Type

getResolve()

public getResolve() : Closure|null
Return values
Closure|null

getResolveParam()

public getResolveParam(string $name) : mixed
Parameters
$name : string
Return values
mixed

getResolveParams()

public getResolveParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSaveResolve()

public getSaveResolve() : Closure|null
Return values
Closure|null

getSchemaJson()

public getSchemaJson(TypeRegistry $typeRegistry) : array<string|int, mixed>
Parameters
$typeRegistry : TypeRegistry
Return values
array<string|int, mixed>

hasResolveParam()

public hasResolveParam(string $name) : bool
Parameters
$name : string
Return values
bool

hasResolver()

public hasResolver() : bool
Return values
bool

hasSaveResolver()

public hasSaveResolver() : bool
Return values
bool

isAllowed()

public isAllowed() : bool
Return values
bool

isRequired()

public isRequired() : bool
Return values
bool

isSingle()

public isSingle() : bool
Return values
bool

name()

public name(string $name) :
Parameters
$name : string
Return values

name()

public name(string $name) : Field
Parameters
$name : string
Return values
Field

options()

public options(array<string|int, mixed> $options) : Field
Parameters
$options : array<string|int, mixed>
Return values
Field

optionsRequest()

public optionsRequest(Closure $callback) : mixed
Parameters
$callback : Closure
Return values
mixed

relatedTypeClass()

public relatedTypeClass(string $RelatedTypeClass) : Relation
Parameters
$RelatedTypeClass : string
Return values
Relation

required()

public required([bool $required = true ]) : Field
Parameters
$required : bool = true
Return values
Field

required()

public required(bool $required = true) :
Parameters
$required = true : bool
Return values

resolve()

public resolve(string|callable|Closure $classOrCallback) : Field
Parameters
$classOrCallback : string|callable|Closure
Return values
Field

resolve()

public resolve(string|callable|Closure $classOrCallback) :
Parameters
$classOrCallback : string|callable|Closure
Return values

resolveParam()

public resolveParam(string $key, mixed $value) :
Parameters
$key : string
$value : mixed
Return values

resolveParam()

public resolveParam(string $key, mixed $value) : Field
Parameters
$key : string
$value : mixed
Return values
Field

resolveParams()

public resolveParams(array<string|int, mixed> $params) : Field
Parameters
$params : array<string|int, mixed>
Return values
Field

resolveParams()

public resolveParams(array<string|int, mixed> $params) :
Parameters
$params : array<string|int, mixed>
Return values

resolveSave()

public resolveSave(string|callable|Closure $classOrCallback) : Field
Parameters
$classOrCallback : string|callable|Closure
Return values
Field

resolveSave()

public resolveSave(string|callable|Closure $classOrCallback) :
Parameters
$classOrCallback : string|callable|Closure
Return values

shallAddItems()

public shallAddItems() : bool
Return values
bool

shallDeleteItems()

public shallDeleteItems() : bool
Return values
bool

shallUpdateItems()

public shallUpdateItems() : bool
Return values
bool

toSchemaJson()

public toSchemaJson() : array<string|int, mixed>
Return values
array<string|int, mixed>

updatesItems()

public updatesItems([bool $updates = true ]) : Relation
Parameters
$updates : bool = true
Return values
Relation

validate()

public validate(Closure $callback) :
Parameters
$callback : Closure
Return values

validate()

public validate(Closure $callback) : Field
Parameters
$callback : Closure
Return values
Field

validator()

public validator(Validator $validator) :
Parameters
$validator : Validator
Return values

Search results