예제 #1
0
 public function __construct($url, $label)
 {
     parent::__construct('a');
     $this->isContainer = false;
     $this->label = $label;
     $this->addAttribute('href', $url);
 }
예제 #2
0
 public function __construct($label, $type)
 {
     parent::__construct('button');
     $this->label = $label;
     $this->isContainer = false;
     $this->addAttribute('type', $type);
 }
예제 #3
0
 public function __construct($label, $for)
 {
     parent::__construct('label');
     $this->isContainer = true;
     $this->labelText = $label;
     $this->addAttribute('for', $for);
 }
예제 #4
0
 public function __construct($value, $label)
 {
     parent::__construct('input');
     $this->addAttribute('type', 'radio');
     $this->addAttribute('value', $value);
     $this->isContainer = false;
     $this->label = $label;
 }
예제 #5
0
 public function __construct($id, $multiple = false)
 {
     parent::__construct('select');
     $this->isContainer = true;
     $this->addAttribute('nome', $id);
     $this->addAttribute('id', $id);
     $this->isMultiple = $multiple;
 }
예제 #6
0
 public function __construct($optionValue, $optionLabel, $selected = false)
 {
     parent::__construct('option');
     $this->isContainer = false;
     $this->isSelected = $selected;
     $this->label = $optionLabel;
     $this->value = $optionValue;
     $this->addAttribute('value', $this->value);
 }
예제 #7
0
 public function __construct($id, $cols, $rows)
 {
     parent::__construct('textarea');
     $this->isContainer = false;
     $this->addAttribute('cols', $cols);
     $this->addAttribute('rows', $rows);
     $this->addAttribute('id', $id);
     $this->addAttribute('name', $id);
 }
예제 #8
0
 public function __construct($id)
 {
     parent::__construct('div');
     $this->addAttribute('id', $id);
     $this->isContainer = true;
 }
예제 #9
0
파일: HTMLInput.php 프로젝트: uhtoff/eCRF
 public function writeID()
 {
     // Produce html ID, checkboxes and radio need addition to ensure uniqueness
     if (($this->type == 'checkbox' || $this->type == 'radio') && $this->id) {
         $oldid = $this->id;
         $this->id .= "_{$this->counter}";
         $this->counter++;
         $html = parent::writeID();
         $this->id = $oldid;
     } else {
         $html = parent::writeID();
     }
     return $html;
 }
예제 #10
0
 public function __construct($type, $id)
 {
     parent::__construct('input');
     $this->addAttribute('name', $id);
     $this->isContainer = false;
 }