Example #1
0
 /**
  * Visit a textarea input node.
  *
  * @param T_Form_TextArea $node
  */
 function visitFormTextArea(T_Form_TextArea $node)
 {
     $attributes = $node->getAllAttributes();
     $attributes += array('rows' => 5, 'cols' => 32, 'name' => $node->getFieldname(), 'id' => $this->getNodeId($node));
     $xhtml = $this->createLabel($node);
     // <textarea>
     $xhtml .= $this->preElement($node);
     $xhtml .= $this->indent . '<textarea ';
     foreach ($attributes as $key => $value) {
         $xhtml .= $key . '="' . $this->escape($value) . '"' . EOL . $this->indent . '       ';
     }
     $xhtml = rtrim($xhtml) . ' >' . EOL;
     $xhtml .= $this->escape($node->getDefault());
     $xhtml .= '</textarea>' . EOL;
     $xhtml .= $this->postElement($node);
     $this->addXhtml($xhtml);
 }