InputField extends AbstractField
Input Field
Stores information regarding a particular Input Field, which may consist of a label, tooltip, input field, or some combination thereof.
Table of Contents
Properties
| $fields | |
| $params | |
| $type |
Methods
| __construct() | Constructs a new AbstractField of the given type. Types directly correlate to Form helper method names. |
| 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 InputField, which will be dispatched to the appropriate Form helper method when needed, or to the tooltip. |
Methods
__construct()
Constructs a new AbstractField of the given type. Types directly correlate to Form helper method names.
public
__construct(string $type) : mixed
Parameters
- $type : string
-
The type of FieldInterface
attach()
Attaches a field to a label FieldInterface, or a tooltip to a label FieldInterface.
public
attach(FieldInterface $field) : InputField
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
InputFieldsetLabel()
Sets the label associated with this specific field.
public
setLabel(FieldInterface $label) : InputField
Parameters
- $label : FieldInterface
-
The FieldInterface label to associated with this field
Return values
InputFieldsetParam()
Sets all parameters for this InputField, which will be dispatched to the appropriate Form helper method when needed, or to the tooltip.
public
setParam(string $name, mixed $value) : InputField
Parameters
- $name : string
-
The name of the parameter. For tooltip types this should be 'message'
- $value : mixed
-
The value of the parameter