Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 /*
|
Chris@0
|
4 * This file is part of the Symfony package.
|
Chris@0
|
5 *
|
Chris@0
|
6 * (c) Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
7 *
|
Chris@0
|
8 * For the full copyright and license information, please view the LICENSE
|
Chris@0
|
9 * file that was distributed with this source code.
|
Chris@0
|
10 */
|
Chris@0
|
11
|
Chris@0
|
12 namespace Symfony\Component\DomCrawler;
|
Chris@0
|
13
|
Chris@0
|
14 use Symfony\Component\DomCrawler\Field\ChoiceFormField;
|
Chris@0
|
15 use Symfony\Component\DomCrawler\Field\FormField;
|
Chris@0
|
16
|
Chris@0
|
17 /**
|
Chris@0
|
18 * Form represents an HTML form.
|
Chris@0
|
19 *
|
Chris@0
|
20 * @author Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
21 */
|
Chris@0
|
22 class Form extends Link implements \ArrayAccess
|
Chris@0
|
23 {
|
Chris@0
|
24 /**
|
Chris@0
|
25 * @var \DOMElement
|
Chris@0
|
26 */
|
Chris@0
|
27 private $button;
|
Chris@0
|
28
|
Chris@0
|
29 /**
|
Chris@0
|
30 * @var FormFieldRegistry
|
Chris@0
|
31 */
|
Chris@0
|
32 private $fields;
|
Chris@0
|
33
|
Chris@0
|
34 /**
|
Chris@0
|
35 * @var string
|
Chris@0
|
36 */
|
Chris@0
|
37 private $baseHref;
|
Chris@0
|
38
|
Chris@0
|
39 /**
|
Chris@0
|
40 * Constructor.
|
Chris@0
|
41 *
|
Chris@0
|
42 * @param \DOMElement $node A \DOMElement instance
|
Chris@0
|
43 * @param string $currentUri The URI of the page where the form is embedded
|
Chris@0
|
44 * @param string $method The method to use for the link (if null, it defaults to the method defined by the form)
|
Chris@0
|
45 * @param string $baseHref The URI of the <base> used for relative links, but not for empty action
|
Chris@0
|
46 *
|
Chris@0
|
47 * @throws \LogicException if the node is not a button inside a form tag
|
Chris@0
|
48 */
|
Chris@0
|
49 public function __construct(\DOMElement $node, $currentUri, $method = null, $baseHref = null)
|
Chris@0
|
50 {
|
Chris@0
|
51 parent::__construct($node, $currentUri, $method);
|
Chris@0
|
52 $this->baseHref = $baseHref;
|
Chris@0
|
53
|
Chris@0
|
54 $this->initialize();
|
Chris@0
|
55 }
|
Chris@0
|
56
|
Chris@0
|
57 /**
|
Chris@0
|
58 * Gets the form node associated with this form.
|
Chris@0
|
59 *
|
Chris@0
|
60 * @return \DOMElement A \DOMElement instance
|
Chris@0
|
61 */
|
Chris@0
|
62 public function getFormNode()
|
Chris@0
|
63 {
|
Chris@0
|
64 return $this->node;
|
Chris@0
|
65 }
|
Chris@0
|
66
|
Chris@0
|
67 /**
|
Chris@0
|
68 * Sets the value of the fields.
|
Chris@0
|
69 *
|
Chris@0
|
70 * @param array $values An array of field values
|
Chris@0
|
71 *
|
Chris@0
|
72 * @return $this
|
Chris@0
|
73 */
|
Chris@0
|
74 public function setValues(array $values)
|
Chris@0
|
75 {
|
Chris@0
|
76 foreach ($values as $name => $value) {
|
Chris@0
|
77 $this->fields->set($name, $value);
|
Chris@0
|
78 }
|
Chris@0
|
79
|
Chris@0
|
80 return $this;
|
Chris@0
|
81 }
|
Chris@0
|
82
|
Chris@0
|
83 /**
|
Chris@0
|
84 * Gets the field values.
|
Chris@0
|
85 *
|
Chris@0
|
86 * The returned array does not include file fields (@see getFiles).
|
Chris@0
|
87 *
|
Chris@0
|
88 * @return array An array of field values
|
Chris@0
|
89 */
|
Chris@0
|
90 public function getValues()
|
Chris@0
|
91 {
|
Chris@0
|
92 $values = array();
|
Chris@0
|
93 foreach ($this->fields->all() as $name => $field) {
|
Chris@0
|
94 if ($field->isDisabled()) {
|
Chris@0
|
95 continue;
|
Chris@0
|
96 }
|
Chris@0
|
97
|
Chris@0
|
98 if (!$field instanceof Field\FileFormField && $field->hasValue()) {
|
Chris@0
|
99 $values[$name] = $field->getValue();
|
Chris@0
|
100 }
|
Chris@0
|
101 }
|
Chris@0
|
102
|
Chris@0
|
103 return $values;
|
Chris@0
|
104 }
|
Chris@0
|
105
|
Chris@0
|
106 /**
|
Chris@0
|
107 * Gets the file field values.
|
Chris@0
|
108 *
|
Chris@0
|
109 * @return array An array of file field values
|
Chris@0
|
110 */
|
Chris@0
|
111 public function getFiles()
|
Chris@0
|
112 {
|
Chris@0
|
113 if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
|
Chris@0
|
114 return array();
|
Chris@0
|
115 }
|
Chris@0
|
116
|
Chris@0
|
117 $files = array();
|
Chris@0
|
118
|
Chris@0
|
119 foreach ($this->fields->all() as $name => $field) {
|
Chris@0
|
120 if ($field->isDisabled()) {
|
Chris@0
|
121 continue;
|
Chris@0
|
122 }
|
Chris@0
|
123
|
Chris@0
|
124 if ($field instanceof Field\FileFormField) {
|
Chris@0
|
125 $files[$name] = $field->getValue();
|
Chris@0
|
126 }
|
Chris@0
|
127 }
|
Chris@0
|
128
|
Chris@0
|
129 return $files;
|
Chris@0
|
130 }
|
Chris@0
|
131
|
Chris@0
|
132 /**
|
Chris@0
|
133 * Gets the field values as PHP.
|
Chris@0
|
134 *
|
Chris@0
|
135 * This method converts fields with the array notation
|
Chris@0
|
136 * (like foo[bar] to arrays) like PHP does.
|
Chris@0
|
137 *
|
Chris@0
|
138 * @return array An array of field values
|
Chris@0
|
139 */
|
Chris@0
|
140 public function getPhpValues()
|
Chris@0
|
141 {
|
Chris@0
|
142 $values = array();
|
Chris@0
|
143 foreach ($this->getValues() as $name => $value) {
|
Chris@0
|
144 $qs = http_build_query(array($name => $value), '', '&');
|
Chris@0
|
145 if (!empty($qs)) {
|
Chris@0
|
146 parse_str($qs, $expandedValue);
|
Chris@0
|
147 $varName = substr($name, 0, strlen(key($expandedValue)));
|
Chris@0
|
148 $values = array_replace_recursive($values, array($varName => current($expandedValue)));
|
Chris@0
|
149 }
|
Chris@0
|
150 }
|
Chris@0
|
151
|
Chris@0
|
152 return $values;
|
Chris@0
|
153 }
|
Chris@0
|
154
|
Chris@0
|
155 /**
|
Chris@0
|
156 * Gets the file field values as PHP.
|
Chris@0
|
157 *
|
Chris@0
|
158 * This method converts fields with the array notation
|
Chris@0
|
159 * (like foo[bar] to arrays) like PHP does.
|
Chris@0
|
160 * The returned array is consistent with the array for field values
|
Chris@0
|
161 * (@see getPhpValues), rather than uploaded files found in $_FILES.
|
Chris@0
|
162 * For a compound file field foo[bar] it will create foo[bar][name],
|
Chris@0
|
163 * instead of foo[name][bar] which would be found in $_FILES.
|
Chris@0
|
164 *
|
Chris@0
|
165 * @return array An array of file field values
|
Chris@0
|
166 */
|
Chris@0
|
167 public function getPhpFiles()
|
Chris@0
|
168 {
|
Chris@0
|
169 $values = array();
|
Chris@0
|
170 foreach ($this->getFiles() as $name => $value) {
|
Chris@0
|
171 $qs = http_build_query(array($name => $value), '', '&');
|
Chris@0
|
172 if (!empty($qs)) {
|
Chris@0
|
173 parse_str($qs, $expandedValue);
|
Chris@0
|
174 $varName = substr($name, 0, strlen(key($expandedValue)));
|
Chris@0
|
175 $values = array_replace_recursive($values, array($varName => current($expandedValue)));
|
Chris@0
|
176 }
|
Chris@0
|
177 }
|
Chris@0
|
178
|
Chris@0
|
179 return $values;
|
Chris@0
|
180 }
|
Chris@0
|
181
|
Chris@0
|
182 /**
|
Chris@0
|
183 * Gets the URI of the form.
|
Chris@0
|
184 *
|
Chris@0
|
185 * The returned URI is not the same as the form "action" attribute.
|
Chris@0
|
186 * This method merges the value if the method is GET to mimics
|
Chris@0
|
187 * browser behavior.
|
Chris@0
|
188 *
|
Chris@0
|
189 * @return string The URI
|
Chris@0
|
190 */
|
Chris@0
|
191 public function getUri()
|
Chris@0
|
192 {
|
Chris@0
|
193 $uri = parent::getUri();
|
Chris@0
|
194
|
Chris@0
|
195 if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
|
Chris@0
|
196 $query = parse_url($uri, PHP_URL_QUERY);
|
Chris@0
|
197 $currentParameters = array();
|
Chris@0
|
198 if ($query) {
|
Chris@0
|
199 parse_str($query, $currentParameters);
|
Chris@0
|
200 }
|
Chris@0
|
201
|
Chris@0
|
202 $queryString = http_build_query(array_merge($currentParameters, $this->getValues()), null, '&');
|
Chris@0
|
203
|
Chris@0
|
204 $pos = strpos($uri, '?');
|
Chris@0
|
205 $base = false === $pos ? $uri : substr($uri, 0, $pos);
|
Chris@0
|
206 $uri = rtrim($base.'?'.$queryString, '?');
|
Chris@0
|
207 }
|
Chris@0
|
208
|
Chris@0
|
209 return $uri;
|
Chris@0
|
210 }
|
Chris@0
|
211
|
Chris@0
|
212 protected function getRawUri()
|
Chris@0
|
213 {
|
Chris@0
|
214 return $this->node->getAttribute('action');
|
Chris@0
|
215 }
|
Chris@0
|
216
|
Chris@0
|
217 /**
|
Chris@0
|
218 * Gets the form method.
|
Chris@0
|
219 *
|
Chris@0
|
220 * If no method is defined in the form, GET is returned.
|
Chris@0
|
221 *
|
Chris@0
|
222 * @return string The method
|
Chris@0
|
223 */
|
Chris@0
|
224 public function getMethod()
|
Chris@0
|
225 {
|
Chris@0
|
226 if (null !== $this->method) {
|
Chris@0
|
227 return $this->method;
|
Chris@0
|
228 }
|
Chris@0
|
229
|
Chris@0
|
230 return $this->node->getAttribute('method') ? strtoupper($this->node->getAttribute('method')) : 'GET';
|
Chris@0
|
231 }
|
Chris@0
|
232
|
Chris@0
|
233 /**
|
Chris@0
|
234 * Returns true if the named field exists.
|
Chris@0
|
235 *
|
Chris@0
|
236 * @param string $name The field name
|
Chris@0
|
237 *
|
Chris@0
|
238 * @return bool true if the field exists, false otherwise
|
Chris@0
|
239 */
|
Chris@0
|
240 public function has($name)
|
Chris@0
|
241 {
|
Chris@0
|
242 return $this->fields->has($name);
|
Chris@0
|
243 }
|
Chris@0
|
244
|
Chris@0
|
245 /**
|
Chris@0
|
246 * Removes a field from the form.
|
Chris@0
|
247 *
|
Chris@0
|
248 * @param string $name The field name
|
Chris@0
|
249 */
|
Chris@0
|
250 public function remove($name)
|
Chris@0
|
251 {
|
Chris@0
|
252 $this->fields->remove($name);
|
Chris@0
|
253 }
|
Chris@0
|
254
|
Chris@0
|
255 /**
|
Chris@0
|
256 * Gets a named field.
|
Chris@0
|
257 *
|
Chris@0
|
258 * @param string $name The field name
|
Chris@0
|
259 *
|
Chris@0
|
260 * @return FormField The field instance
|
Chris@0
|
261 *
|
Chris@0
|
262 * @throws \InvalidArgumentException When field is not present in this form
|
Chris@0
|
263 */
|
Chris@0
|
264 public function get($name)
|
Chris@0
|
265 {
|
Chris@0
|
266 return $this->fields->get($name);
|
Chris@0
|
267 }
|
Chris@0
|
268
|
Chris@0
|
269 /**
|
Chris@0
|
270 * Sets a named field.
|
Chris@0
|
271 *
|
Chris@0
|
272 * @param FormField $field The field
|
Chris@0
|
273 */
|
Chris@0
|
274 public function set(FormField $field)
|
Chris@0
|
275 {
|
Chris@0
|
276 $this->fields->add($field);
|
Chris@0
|
277 }
|
Chris@0
|
278
|
Chris@0
|
279 /**
|
Chris@0
|
280 * Gets all fields.
|
Chris@0
|
281 *
|
Chris@0
|
282 * @return FormField[]
|
Chris@0
|
283 */
|
Chris@0
|
284 public function all()
|
Chris@0
|
285 {
|
Chris@0
|
286 return $this->fields->all();
|
Chris@0
|
287 }
|
Chris@0
|
288
|
Chris@0
|
289 /**
|
Chris@0
|
290 * Returns true if the named field exists.
|
Chris@0
|
291 *
|
Chris@0
|
292 * @param string $name The field name
|
Chris@0
|
293 *
|
Chris@0
|
294 * @return bool true if the field exists, false otherwise
|
Chris@0
|
295 */
|
Chris@0
|
296 public function offsetExists($name)
|
Chris@0
|
297 {
|
Chris@0
|
298 return $this->has($name);
|
Chris@0
|
299 }
|
Chris@0
|
300
|
Chris@0
|
301 /**
|
Chris@0
|
302 * Gets the value of a field.
|
Chris@0
|
303 *
|
Chris@0
|
304 * @param string $name The field name
|
Chris@0
|
305 *
|
Chris@0
|
306 * @return FormField The associated Field instance
|
Chris@0
|
307 *
|
Chris@0
|
308 * @throws \InvalidArgumentException if the field does not exist
|
Chris@0
|
309 */
|
Chris@0
|
310 public function offsetGet($name)
|
Chris@0
|
311 {
|
Chris@0
|
312 return $this->fields->get($name);
|
Chris@0
|
313 }
|
Chris@0
|
314
|
Chris@0
|
315 /**
|
Chris@0
|
316 * Sets the value of a field.
|
Chris@0
|
317 *
|
Chris@0
|
318 * @param string $name The field name
|
Chris@0
|
319 * @param string|array $value The value of the field
|
Chris@0
|
320 *
|
Chris@0
|
321 * @throws \InvalidArgumentException if the field does not exist
|
Chris@0
|
322 */
|
Chris@0
|
323 public function offsetSet($name, $value)
|
Chris@0
|
324 {
|
Chris@0
|
325 $this->fields->set($name, $value);
|
Chris@0
|
326 }
|
Chris@0
|
327
|
Chris@0
|
328 /**
|
Chris@0
|
329 * Removes a field from the form.
|
Chris@0
|
330 *
|
Chris@0
|
331 * @param string $name The field name
|
Chris@0
|
332 */
|
Chris@0
|
333 public function offsetUnset($name)
|
Chris@0
|
334 {
|
Chris@0
|
335 $this->fields->remove($name);
|
Chris@0
|
336 }
|
Chris@0
|
337
|
Chris@0
|
338 /**
|
Chris@0
|
339 * Disables validation.
|
Chris@0
|
340 *
|
Chris@0
|
341 * @return self
|
Chris@0
|
342 */
|
Chris@0
|
343 public function disableValidation()
|
Chris@0
|
344 {
|
Chris@0
|
345 foreach ($this->fields->all() as $field) {
|
Chris@0
|
346 if ($field instanceof Field\ChoiceFormField) {
|
Chris@0
|
347 $field->disableValidation();
|
Chris@0
|
348 }
|
Chris@0
|
349 }
|
Chris@0
|
350
|
Chris@0
|
351 return $this;
|
Chris@0
|
352 }
|
Chris@0
|
353
|
Chris@0
|
354 /**
|
Chris@0
|
355 * Sets the node for the form.
|
Chris@0
|
356 *
|
Chris@0
|
357 * Expects a 'submit' button \DOMElement and finds the corresponding form element, or the form element itself.
|
Chris@0
|
358 *
|
Chris@0
|
359 * @param \DOMElement $node A \DOMElement instance
|
Chris@0
|
360 *
|
Chris@0
|
361 * @throws \LogicException If given node is not a button or input or does not have a form ancestor
|
Chris@0
|
362 */
|
Chris@0
|
363 protected function setNode(\DOMElement $node)
|
Chris@0
|
364 {
|
Chris@0
|
365 $this->button = $node;
|
Chris@0
|
366 if ('button' === $node->nodeName || ('input' === $node->nodeName && in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) {
|
Chris@0
|
367 if ($node->hasAttribute('form')) {
|
Chris@0
|
368 // if the node has the HTML5-compliant 'form' attribute, use it
|
Chris@0
|
369 $formId = $node->getAttribute('form');
|
Chris@0
|
370 $form = $node->ownerDocument->getElementById($formId);
|
Chris@0
|
371 if (null === $form) {
|
Chris@0
|
372 throw new \LogicException(sprintf('The selected node has an invalid form attribute (%s).', $formId));
|
Chris@0
|
373 }
|
Chris@0
|
374 $this->node = $form;
|
Chris@0
|
375
|
Chris@0
|
376 return;
|
Chris@0
|
377 }
|
Chris@0
|
378 // we loop until we find a form ancestor
|
Chris@0
|
379 do {
|
Chris@0
|
380 if (null === $node = $node->parentNode) {
|
Chris@0
|
381 throw new \LogicException('The selected node does not have a form ancestor.');
|
Chris@0
|
382 }
|
Chris@0
|
383 } while ('form' !== $node->nodeName);
|
Chris@0
|
384 } elseif ('form' !== $node->nodeName) {
|
Chris@0
|
385 throw new \LogicException(sprintf('Unable to submit on a "%s" tag.', $node->nodeName));
|
Chris@0
|
386 }
|
Chris@0
|
387
|
Chris@0
|
388 $this->node = $node;
|
Chris@0
|
389 }
|
Chris@0
|
390
|
Chris@0
|
391 /**
|
Chris@0
|
392 * Adds form elements related to this form.
|
Chris@0
|
393 *
|
Chris@0
|
394 * Creates an internal copy of the submitted 'button' element and
|
Chris@0
|
395 * the form node or the entire document depending on whether we need
|
Chris@0
|
396 * to find non-descendant elements through HTML5 'form' attribute.
|
Chris@0
|
397 */
|
Chris@0
|
398 private function initialize()
|
Chris@0
|
399 {
|
Chris@0
|
400 $this->fields = new FormFieldRegistry();
|
Chris@0
|
401
|
Chris@0
|
402 $xpath = new \DOMXPath($this->node->ownerDocument);
|
Chris@0
|
403
|
Chris@0
|
404 // add submitted button if it has a valid name
|
Chris@0
|
405 if ('form' !== $this->button->nodeName && $this->button->hasAttribute('name') && $this->button->getAttribute('name')) {
|
Chris@0
|
406 if ('input' == $this->button->nodeName && 'image' == strtolower($this->button->getAttribute('type'))) {
|
Chris@0
|
407 $name = $this->button->getAttribute('name');
|
Chris@0
|
408 $this->button->setAttribute('value', '0');
|
Chris@0
|
409
|
Chris@0
|
410 // temporarily change the name of the input node for the x coordinate
|
Chris@0
|
411 $this->button->setAttribute('name', $name.'.x');
|
Chris@0
|
412 $this->set(new Field\InputFormField($this->button));
|
Chris@0
|
413
|
Chris@0
|
414 // temporarily change the name of the input node for the y coordinate
|
Chris@0
|
415 $this->button->setAttribute('name', $name.'.y');
|
Chris@0
|
416 $this->set(new Field\InputFormField($this->button));
|
Chris@0
|
417
|
Chris@0
|
418 // restore the original name of the input node
|
Chris@0
|
419 $this->button->setAttribute('name', $name);
|
Chris@0
|
420 } else {
|
Chris@0
|
421 $this->set(new Field\InputFormField($this->button));
|
Chris@0
|
422 }
|
Chris@0
|
423 }
|
Chris@0
|
424
|
Chris@0
|
425 // find form elements corresponding to the current form
|
Chris@0
|
426 if ($this->node->hasAttribute('id')) {
|
Chris@0
|
427 // corresponding elements are either descendants or have a matching HTML5 form attribute
|
Chris@0
|
428 $formId = Crawler::xpathLiteral($this->node->getAttribute('id'));
|
Chris@0
|
429
|
Chris@0
|
430 $fieldNodes = $xpath->query(sprintf('descendant::input[@form=%s] | descendant::button[@form=%s] | descendant::textarea[@form=%s] | descendant::select[@form=%s] | //form[@id=%s]//input[not(@form)] | //form[@id=%s]//button[not(@form)] | //form[@id=%s]//textarea[not(@form)] | //form[@id=%s]//select[not(@form)]', $formId, $formId, $formId, $formId, $formId, $formId, $formId, $formId));
|
Chris@0
|
431 foreach ($fieldNodes as $node) {
|
Chris@0
|
432 $this->addField($node);
|
Chris@0
|
433 }
|
Chris@0
|
434 } else {
|
Chris@0
|
435 // do the xpath query with $this->node as the context node, to only find descendant elements
|
Chris@0
|
436 // however, descendant elements with form attribute are not part of this form
|
Chris@0
|
437 $fieldNodes = $xpath->query('descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)]', $this->node);
|
Chris@0
|
438 foreach ($fieldNodes as $node) {
|
Chris@0
|
439 $this->addField($node);
|
Chris@0
|
440 }
|
Chris@0
|
441 }
|
Chris@0
|
442
|
Chris@0
|
443 if ($this->baseHref && '' !== $this->node->getAttribute('action')) {
|
Chris@0
|
444 $this->currentUri = $this->baseHref;
|
Chris@0
|
445 }
|
Chris@0
|
446 }
|
Chris@0
|
447
|
Chris@0
|
448 private function addField(\DOMElement $node)
|
Chris@0
|
449 {
|
Chris@0
|
450 if (!$node->hasAttribute('name') || !$node->getAttribute('name')) {
|
Chris@0
|
451 return;
|
Chris@0
|
452 }
|
Chris@0
|
453
|
Chris@0
|
454 $nodeName = $node->nodeName;
|
Chris@0
|
455 if ('select' == $nodeName || 'input' == $nodeName && 'checkbox' == strtolower($node->getAttribute('type'))) {
|
Chris@0
|
456 $this->set(new Field\ChoiceFormField($node));
|
Chris@0
|
457 } elseif ('input' == $nodeName && 'radio' == strtolower($node->getAttribute('type'))) {
|
Chris@0
|
458 // there may be other fields with the same name that are no choice
|
Chris@0
|
459 // fields already registered (see https://github.com/symfony/symfony/issues/11689)
|
Chris@0
|
460 if ($this->has($node->getAttribute('name')) && $this->get($node->getAttribute('name')) instanceof ChoiceFormField) {
|
Chris@0
|
461 $this->get($node->getAttribute('name'))->addChoice($node);
|
Chris@0
|
462 } else {
|
Chris@0
|
463 $this->set(new Field\ChoiceFormField($node));
|
Chris@0
|
464 }
|
Chris@0
|
465 } elseif ('input' == $nodeName && 'file' == strtolower($node->getAttribute('type'))) {
|
Chris@0
|
466 $this->set(new Field\FileFormField($node));
|
Chris@0
|
467 } elseif ('input' == $nodeName && !in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image'))) {
|
Chris@0
|
468 $this->set(new Field\InputFormField($node));
|
Chris@0
|
469 } elseif ('textarea' == $nodeName) {
|
Chris@0
|
470 $this->set(new Field\TextareaFormField($node));
|
Chris@0
|
471 }
|
Chris@0
|
472 }
|
Chris@0
|
473 }
|