Documentation

Field extends BagEntry Uses ToSchemaJsonTrait

Table of Contents

$type  : string
$allowed  : bool
$container  : Container
$name  : string
$options  : array<string|int, mixed>
$optionsRequestCallback  : Closure
$required  : bool
$resolveCallback  : string|callable|Closure
$resolveParams  : array<string|int, mixed>
$resolveSaveCallback  : string|callable|Closure
$validator  : Validator|null
allowed()  : Field
clone()  : Field
container()  : void
created()  : void
getName()  : string
getOptions()  : array<string|int, mixed>
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
name()  : Field
options()  : Field
optionsRequest()  : mixed
required()  : Field
resolve()  : Field
resolveParam()  : Field
resolveParams()  : Field
resolveSave()  : Field
toSchemaJson()  : array<string|int, mixed>
validate()  : Field
validator()  : Field

Properties

$type

public static string $type

$allowed

protected bool $allowed = false

$name

protected string $name

$options

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

$optionsRequestCallback

protected Closure $optionsRequestCallback

$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

allowed()

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

created()

public created() : void
Return values
void

getName()

public getName() : string
Return values
string

getOptions()

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

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

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

required()

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

resolve()

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

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

resolveSave()

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

toSchemaJson()

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

validate()

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

Search results