FormField
in package
FormField is the abstract class for all form fields.
Tags
Table of Contents
- $disabled : bool
- $document : DOMDocument
- $name : string
- $node : DOMElement
- $value : string
- $xpath : DOMXPath
- __construct() : mixed
- getLabel() : DOMElement|null
- Returns the label tag associated to the field or null if none.
- getName() : string
- Returns the name of the field.
- getValue() : string|array<string|int, mixed>
- Gets the value of the field.
- hasValue() : bool
- Returns true if the field should be included in the submitted values.
- isDisabled() : bool
- Check if the current field is disabled.
- setValue() : mixed
- Sets the value of the field.
- initialize() : mixed
- Initializes the form field.
Properties
$disabled
protected
bool
$disabled
$document
protected
DOMDocument
$document
$name
protected
string
$name
$node
protected
DOMElement
$node
$value
protected
string
$value
$xpath
protected
DOMXPath
$xpath
Methods
__construct()
public
__construct(DOMElement $node) : mixed
Parameters
- $node : DOMElement
-
The node associated with this field
Return values
mixed —getLabel()
Returns the label tag associated to the field or null if none.
public
getLabel() : DOMElement|null
Return values
DOMElement|null —getName()
Returns the name of the field.
public
getName() : string
Return values
string —The name of the field
getValue()
Gets the value of the field.
public
getValue() : string|array<string|int, mixed>
Return values
string|array<string|int, mixed> —The value of the field
hasValue()
Returns true if the field should be included in the submitted values.
public
hasValue() : bool
Return values
bool —true if the field should be included in the submitted values, false otherwise
isDisabled()
Check if the current field is disabled.
public
isDisabled() : bool
Return values
bool —setValue()
Sets the value of the field.
public
setValue(string|null $value) : mixed
Parameters
- $value : string|null
Return values
mixed —initialize()
Initializes the form field.
protected
abstract initialize() : mixed