FormField

FormField

class FormField

FormField is the abstract class for all form fields.

Methods

__construct(DOMElement $node)

Constructor.

DOMElement|null getLabel()

Returns the label tag associated to the field or null if none.

string getName()

Returns the name of the field.

string|array getValue()

Gets the value of the field.

setValue(string $value)

Sets the value of the field.

bool hasValue()

Returns true if the field should be included in the submitted values.

bool isDisabled()

Check if the current field is disabled.

Details

__construct(DOMElement $node)

Constructor.

Parameters

DOMElement $node The node associated with this field

DOMElement|null getLabel()

Returns the label tag associated to the field or null if none.

Return Value

DOMElement|null

string getName()

Returns the name of the field.

Return Value

string The name of the field

string|array getValue()

Gets the value of the field.

Return Value

string|array The value of the field

setValue(string $value)

Sets the value of the field.

Parameters

string $value The value of the field

bool hasValue()

Returns true if the field should be included in the submitted values.

Return Value

bool true if the field should be included in the submitted values, false otherwise

bool isDisabled()

Check if the current field is disabled.

Return Value

bool

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/DomCrawler/Field/FormField.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部