function TextareaFormField::initialize
Initializes the form field.
Throws
\LogicException When node type is incorrect
Overrides FormField::initialize
File
-
vendor/
symfony/ dom-crawler/ Field/ TextareaFormField.php, line 26
Class
- TextareaFormField
- TextareaFormField represents a textarea form field (an HTML textarea tag).
Namespace
Symfony\Component\DomCrawler\FieldCode
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;
}
}