Esempio n. 1
0
 public function getElementJs()
 {
     if ($this->textarea !== null) {
         return $this->textarea->getElementJs();
     }
     $invitation = $this->getHasInvitation() ? $this->getInvitation() : false;
     $jsString = "var formElement = new OwWysiwyg(" . json_encode($this->getId()) . ", " . json_encode($this->getName()) . ", " . json_encode($invitation) . ");            \r\n        ";
     /** @var $value Validator  */
     foreach ($this->validators as $value) {
         $jsString .= "formElement.addValidator(" . $value->getJsValidator() . ");";
     }
     return $jsString;
 }