You are here

class TextareaFormField in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dom-crawler/Field/TextareaFormField.php \Symfony\Component\DomCrawler\Field\TextareaFormField

TextareaFormField represents a textarea form field (an HTML textarea tag).

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

Expanded class hierarchy of TextareaFormField

2 files declare their use of TextareaFormField
BrowserKitDriver.php in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
TextareaFormFieldTest.php in vendor/symfony/dom-crawler/Tests/Field/TextareaFormFieldTest.php
1 string reference to 'TextareaFormField'
FormTest::provideInitializeValues in vendor/symfony/dom-crawler/Tests/FormTest.php

File

vendor/symfony/dom-crawler/Field/TextareaFormField.php, line 19

Namespace

Symfony\Component\DomCrawler\Field
View source
class TextareaFormField extends FormField {

  /**
   * Initializes the form field.
   *
   * @throws \LogicException When node type is incorrect
   */
  protected function initialize() {
    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

Namesort descending Modifiers Type Description Overrides
FormField::$disabled protected property
FormField::$document protected property
FormField::$name protected property
FormField::$node protected property
FormField::$value protected property
FormField::$xpath protected property
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 Constructor.
TextareaFormField::initialize protected function Initializes the form field. Overrides FormField::initialize