Exemple #1
0
 /**
  * @see Renderable::render()
  */
 public function render(\DOMDocument $domDocument)
 {
     $domElement = parent::render($domDocument);
     if ($this->name) {
         $domElement->setAttribute("name", $this->name);
     }
     if ($this->default !== null) {
         $domElement->setAttribute("default", $this->default);
     } else {
         if ($this->autoComplete) {
             $value = Parameters::getValue($this->name);
             if ($value) {
                 $domElement->setAttribute("default", $value);
             }
         }
     }
     if ($this->autoNewLine) {
         $domElement->setAttribute("autonewline", 1);
     }
     if ($this->scriptEvents) {
         $domElement->setAttribute("scriptevents", 1);
     }
     if ($this->style) {
         $domElement->setAttribute("style", $this->style);
     }
     if ($this->textColor) {
         $domElement->setAttribute("textcolor", $this->textColor);
     }
     if ($this->textSize) {
         $domElement->setAttribute("textsize", $this->textSize);
     }
     if ($this->textFont) {
         $domElement->setAttribute("textfont", $this->textFont);
     }
     if ($this->areaColor) {
         $domElement->setAttribute("focusareacolor1", $this->areaColor);
     }
     if ($this->focusAreaColor) {
         $domElement->setAttribute("focusareacolor2", $this->focusAreaColor);
     }
     return $domElement;
 }
 public function testGetValueWithPOST()
 {
     $this->assertEquals("test-post-value", Parameters::getValue("test-post-name"));
 }