예제 #1
0
파일: Textarea.php 프로젝트: robik/QForm
 public function __construct($name, $default = '', array $attributes = array())
 {
     parent::__construct('textarea');
     $this->setName($name);
     $this->appendText($default);
     $this->setAttributes($attributes);
 }
예제 #2
0
파일: Option.php 프로젝트: robik/QForm
 public function __construct($value, $text, array $attributes = array())
 {
     parent::__construct('option', $value);
     $this->setAttribute('value', $value);
     $this->appendText($text);
     $this->inline = true;
     $this->setAttributes($attributes);
 }
예제 #3
0
파일: Label.php 프로젝트: robik/QForm
 public function __construct($for, $text, array $attributes = array())
 {
     parent::__construct('label', $text);
     $this->inline = true;
     $this->setAttribute('for', $for);
     $this->appendText($text);
     $this->setAttributes($attributes);
 }
예제 #4
0
파일: Form.php 프로젝트: robik/QForm
 /**
  * Creates new form
  * 
  * @param string $target    Form target, as URI
  * @param string $method    Form method, post or get
  */
 public function __construct($target, $method = 'get', array $attributes = array())
 {
     parent::__construct('form');
     $this->setTarget($target);
     $this->setMethod($method);
 }
예제 #5
0
파일: Select.php 프로젝트: robik/QForm
 public function __construct($name, array $attributes = array())
 {
     parent::__construct('select');
     $this->setName($name);
     $this->setAttributes($attributes);
 }