class TextareaFormField
TextareaFormField represents a textarea form field (an HTML textarea tag).
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\DomCrawler\Field\FormField
- class \Symfony\Component\DomCrawler\Field\TextareaFormField extends \Symfony\Component\DomCrawler\Field\FormField
Expanded class hierarchy of TextareaFormField
File
-
vendor/
symfony/ dom-crawler/ Field/ TextareaFormField.php, line 19
Namespace
Symfony\Component\DomCrawler\FieldView source
class TextareaFormField extends FormField {
/**
* Initializes the form field.
*
* @throws \LogicException When node type is incorrect
*/
protected function initialize() : void {
if ('textarea' !== $this->node->nodeName) {
throw new \LogicException(\sprintf('A TextareaFormField can only be created from a textarea tag (%s given).', $this->node->nodeName));
}
$this->value = '';
foreach ($this->node->childNodes as $node) {
$this->value .= $node->wholeText;
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
FormField::$disabled | protected | property | |||
FormField::$document | protected | property | |||
FormField::$name | protected | property | |||
FormField::$value | protected | property | |||
FormField::$xpath | protected | property | |||
FormField::getLabel | public | function | Returns the label tag associated to the field or null if none. | ||
FormField::getName | public | function | Returns the name of the field. | ||
FormField::getValue | public | function | Gets the value of the field. | ||
FormField::hasValue | public | function | Returns true if the field should be included in the submitted values. | 1 | |
FormField::isDisabled | public | function | Check if the current field is disabled. | 1 | |
FormField::setValue | public | function | Sets the value of the field. | 2 | |
FormField::__construct | public | function | |||
TextareaFormField::initialize | protected | function | Initializes the form field. | Overrides FormField::initialize |