Class Schema
Contains the schema information for Form instances.
Method Detail
__debugInfosource public
__debugInfo( )
Get the printable version of this object
Returns
array
array
addFieldsource public
addField( string $name , string|array $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
mixed
$this
addFieldssource public
addFields( array $fields )
Add multiple fields to the schema.
Parameters
-
array
$fields
- The fields to add.
Returns
mixed
$this
fieldsource public
field( string $name )
Get the attributes for a given field.
Parameters
-
string
$name
- The field name.
Returns
null|array
The attributes for a field, or null.
fieldTypesource public
fieldType( string $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.
fieldssource public
fields( )
Get the list of fields in the schema.
Returns
array
The list of field names.
removeFieldsource public
removeField( string $name )
Removes a field to the schema.
Parameters
-
string
$name
- The field to remove.
Returns
mixed
$this
Properties summary
$_fieldDefaultssource
protected array
The default values for fields.
[ 'type' => null, 'length' => null, 'precision' => null, ]
© 2005–2016 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.
http://api.cakephp.org/3.1/class-Cake.Form.Schema.html