コード例 #1
0
ファイル: HTMLInputRadio.php プロジェクト: primephp/framework
 /**
  * Cria um elemento HTMLInputRadio, passando para ele um nome, sendo que
  * diferente dos outros elementos HTML, o id é gerado concatenando o nome
  * mais uniqid(), para a utilização de label em grupos de radiobuttons
  * @param type $name 
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->element->name = $name;
     $this->element->id = $name . uniqid();
     $this->element->type = 'radio';
 }
コード例 #2
0
 public function __construct($name)
 {
     parent::__construct();
     $this->element->name = $name;
     $this->element->id = $name;
     $this->element->type = 'submit';
 }
コード例 #3
0
 public function __construct($name)
 {
     parent::__construct();
     $this->element->type = "checkbox";
     $this->element->name = $name;
     $this->element->id = $name;
 }
コード例 #4
0
ファイル: HTMLTextarea.php プロジェクト: primephp/framework
 /**
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct("textarea");
     $this->element->name = $name;
     $this->element->id = $name;
     $this->element->type = 'text';
     $this->element->rows = "3";
     $this->element->cols = "30";
     $this->element->appendChild('');
 }
コード例 #5
0
ファイル: HTMLButton.php プロジェクト: primephp/framework
 /**
  * Cria um elemento HTML Button
  * @param string $name
  * @param bool $assync se TRUE o evento será executado de maneira assíncrona
  */
 public function __construct($name, $assync = FALSE)
 {
     parent::__construct();
     $this->element->type = "button";
     $this->element->name = $name;
     $this->element->id = $name;
     /**
      * Para que seja utilizável a chamada assíncrona do HTMLAnchor, é necessário
      * que esteja fixo no arquivos functions do Framework a referida função
      */
     if ($assync) {
         $this->element->setAttribute(IMouseEvent::CLICK, 'return $.callAssync(this);');
     }
 }