BoolField

Class. It extends Field.

use Saij\WpAppFramework\Query\Field\BoolField;

A bool field of a meta class or a column of a table; WordPress stores true as "1" and false as "" in meta fields, a table as 1 and 0.

Constructor

new BoolField(string $class, string $field)
ParameterTypeDefaultDescription
classclass-stringrequiredThe class the field belongs to: a meta class (#[PostMeta]) or row class (#[Table]).
fieldstringrequiredThe name of the constructor parameter.

Methods

equals()

equals(bool $value): Condition

Matches values equal to $value.

ParameterTypeDefaultDescription
valueboolrequiredTrue or false.

Returns Condition

getClass()

getClass(): string

The class the field belongs to.

Returns class-string

getField()

getField(): string

The name of the field: the name of the constructor parameter.

Returns string