示例#1
0
文件: File.php 项目: gsouf/uform
 /**
  * File constructor.
  * @param string $name
  * @param bool $multiple whether or not multiple file can be selected
  * @param string $accept file type to accept @link http://www.w3schools.com/tags/att_input_accept.asp
  *
  */
 public function __construct($name, $multiple = false, $accept = null)
 {
     // TODO multiple can be a number
     // TODO more validation (file type, mime type, image size, ...)
     parent::__construct('file', $name);
     $this->multiple = $multiple;
     $this->accept = $accept;
     $this->addSemanticType('input:file');
 }
示例#2
0
 public function __construct($name, $attributes = null, $validators = null, $filters = null)
 {
     parent::__construct("submit", $name, $attributes, $validators, $filters);
 }
示例#3
0
 public function __construct($name, $value = null, $attributes = null, $validators = null, $filters = null)
 {
     parent::__construct("checkbox", $name, $attributes, $validators, $filters);
     $this->value = $value;
 }
示例#4
0
文件: Text.php 项目: gsouf/uform
 public function __construct($name)
 {
     parent::__construct('text', $name);
     $this->addSemanticType('input:textfield');
     $this->addSemanticType('input:text');
 }
示例#5
0
文件: Submit.php 项目: gsouf/uform
 public function __construct($name = null)
 {
     parent::__construct('submit', $name);
     $this->addSemanticType('input:submit');
 }
示例#6
0
文件: Hidden.php 项目: gsouf/uform
 public function __construct($name)
 {
     parent::__construct('hidden', $name);
     $this->addSemanticType('input:hidden');
 }
示例#7
0
文件: Check.php 项目: gsouf/uform
 public function __construct($name)
 {
     parent::__construct('checkbox', $name);
     $this->addSemanticType('input:checkbox');
 }
示例#8
0
文件: Radio.php 项目: gsouf/uform
 public function __construct($name, $value)
 {
     parent::__construct('radio', $name);
     $this->addSemanticType('input:radio');
     $this->value = $value;
 }