FieldInterface
Field Interface
Stores information regarding a particular Field, which may consist of a label, tooltip, input field, or some combination thereof.
Table of Contents
Methods
| attach() | Attaches a field to a label FieldInterface, or a tooltip to a label FieldInterface. |
| setLabel() | Sets the label associated with this specific field. |
| setParam() | Sets all parameters for this FieldInterface, which will be dispatched to the appropriate Form helper method when needed, or to the tooltip. |
Methods
attach()
Attaches a field to a label FieldInterface, or a tooltip to a label FieldInterface.
public
attach(FieldInterface $field) : FieldInterface
Only field and tooltip types can be attached to a label. So the current object must be of type "label". And $field must be of some other type.
Parameters
- $field : FieldInterface
-
The FieldInterface to attach to this label
Return values
FieldInterfacesetLabel()
Sets the label associated with this specific field.
public
setLabel(FieldInterface $label) : FieldInterface
Parameters
- $label : FieldInterface
-
The FieldInterface label to associated with this field
Return values
FieldInterfacesetParam()
Sets all parameters for this FieldInterface, which will be dispatched to the appropriate Form helper method when needed, or to the tooltip.
public
setParam(string $name, mixed $value) : FieldInterface
Parameters
- $name : string
-
The name of the parameter. For tooltip types this should be 'message'
- $value : mixed
-
The value of the parameter