| Methods |
public
|
__construct(array<string, mixed> $defaults = [])
|
#
|
public
|
setOwner(Model $owner): $this
|
#
|
public
|
setDefaults(array<string, mixed> $properties, bool $passively = false): self
|
#
|
protected
|
onHookToOwnerEntity<T is Model>(
string $spot,
Closure(T, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): mixed $fx,
array<int, mixed> $args = [],
int $priority = 5,
): int
|
#
|
private
|
normalizeUsingTypecast(mixed $value): mixed
|
#
|
public
|
normalize(mixed $value): mixed
Depending on the type of a current field, this will perform
some normalization for strict types. This method must also…
Depending on the type of a current field, this will perform
some normalization for strict types. This method must also make
sure that $f->required is respected when setting the value, e.g.
you can't set value to '' if type=string and required=true.
Overriden by
|
#
|
final
public
|
get(Model $entity): mixed
Returns field value.
|
#
|
final
public
|
set(Model $entity, mixed $value): self
Sets field value.
|
#
|
final
public
|
setNull(Model $entity): self
Unset field value even if null value is not allowed.
Unset field value even if null value is not allowed.
|
#
|
private
|
typecastSaveField(mixed $value, bool $allowGenericPersistence = false): mixed
|
#
|
private
|
getValueForCompare(mixed $value): ?string
|
#
|
public
|
compare(mixed $value, mixed $value2): bool
Compare new value of the field with existing one without retrieving.
Compare new value of the field with existing one without retrieving.
|
#
|
public
|
hasReference(): bool
|
#
|
public
|
getReference(): Reference
|
#
|
public
|
getPersistenceName(): string
|
#
|
public
|
useAlias(): bool
Should this field use alias?
Should this field use alias?
Overriden by
|
#
|
public
|
getQueryArguments(string|null $operator, mixed $value): array{$this, string, mixed}
Returns arguments to be used for query on this field based on the condition.
Returns arguments to be used for query on this field based on the condition.
Parameters
| $operator |
one of Scope\Condition operators
|
| $value |
the condition value to be handled
|
|
#
|
public
|
isEditable(): bool
Returns if field should be editable in UI.
Returns if field should be editable in UI.
|
#
|
public
|
isVisible(): bool
Returns if field should be visible in UI.
Returns if field should be visible in UI.
|
#
|
public
|
isHidden(): bool
Returns if field should be hidden in UI.
Returns if field should be hidden in UI.
|
#
|
public
|
getCaption(): string
Returns field caption for use in UI.
Returns field caption for use in UI.
|
#
|
public
|
getDsqlExpression(Expression $expression): Expression
When field is used as expression, this method will be called.
When field is used as expression, this method will be called.
Off-load implementation into persistence.
Overriden by
Implements
|
#
|
public
|
__debugInfo(): array<string, mixed>
|
#
|
public
|
getOwner(): Model
|
#
|