FileFormField
class FileFormField extends FormField
FileFormField represents a file form field (an HTML file input tag).
Properties
protected DOMElement | $node | from FormField | |
protected string | $name | from FormField | |
protected string | $value | from FormField | |
protected DOMDocument | $document | from FormField | |
protected DOMXPath | $xpath | from FormField | |
protected bool | $disabled | from FormField |
Methods
DOMElement|null
getLabel()
Returns the label tag associated to the field or null if none.
from FormField
setValue(string $value)
Sets the value of the field.
bool
hasValue()
Returns true if the field should be included in the submitted values.
from FormField
initialize()
Initializes the form field.
setErrorCode(int $error)
Sets the PHP error code associated with the field.
upload(string $value)
Sets the value of the field.
setFilePath(string $path)
Sets path to the file as string for simulating HTTP request.