Class Schema
Contains the schema information for Form instances.
Properties summary
- $_fieldDefaults protected
array
The default values for fields.
- $_fields protected
array
The fields in this schema.
Method Summary
Method Detail
__debugInfo() public
__debugInfo()
Get the printable version of this object
Returns
array
addField() public
addField(mixed $name, mixed $attrs)
Adds a field to the schema.
Parameters
-
string
$name The field name.
-
string|array
$attrs The attributes for the field, or the type as a string.
Returns
$this
addFields() public
addFields(array $fields)
Add multiple fields to the schema.
Parameters
-
array
$fields The fields to add.
Returns
$this
field() public
field(mixed $name)
Get the attributes for a given field.
Parameters
-
string
$name The field name.
Returns
array|null
The attributes for a field, or null.
fieldType() public
fieldType(mixed $name)
Get the type of the named field.
Parameters
-
string
$name The name of the field.
Returns
string|null
Either the field type or null if the field does not exist.
fields() public
fields()
Get the list of fields in the schema.
Returns
string[]
The list of field names.
removeField() public
removeField(mixed $name)
Removes a field to the schema.
Parameters
-
string
$name The field to remove.
Returns
$this
Property Detail
$_fieldDefaults protected
The default values for fields.
Type
array
$_fields protected
The fields in this schema.
Type
array
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.9/class-Cake.Form.Schema.html