Exemplo n.º 1
0
 public function __construct($width, $name = null, $elements = null)
 {
     parent::__construct($name, $elements);
     $this->addSemanticType("column");
     if ($width < 0) {
         throw new Exception("Column width cant be negative");
     }
     $this->width = $width;
 }
Exemplo n.º 2
0
Arquivo: Form.php Projeto: gsouf/uform
 /**
  * @param string $action form action
  * @param string $method form method
  */
 public function __construct($action = null, $method = null)
 {
     $this->form = $this;
     parent::__construct();
     $this->addSemanticType('form');
     if ($action) {
         $this->setAction($action);
     }
     if ($method) {
         $this->setMethod($method);
     } else {
         $this->setMethod(self::METHOD_POST);
     }
 }
Exemplo n.º 3
0
 /**
  *
  * @param string $name name of the checkbox. Just type "name" and it will generate some "name[]"
  * @param array $values list of checkboxes to create
  * @throws \UForm\Exception
  */
 public function __construct($name, $values)
 {
     $elements = [];
     $i = 0;
     foreach ($values as $k => $v) {
         if (is_string($v) || is_int($v)) {
             $elements[] = new Check($k, $v);
         } else {
             throw new Exception("Invalid type for checkgroup creation");
         }
         $i++;
     }
     parent::__construct($name, $elements);
     $this->addSemanticType("checkGroup");
 }
Exemplo n.º 4
0
 public function __construct($proxyName = null)
 {
     parent::__construct(null);
     $this->proxyName = $proxyName;
 }
Exemplo n.º 5
0
 public function __construct($title = null, $name = null, $elements = [])
 {
     parent::__construct($name, $elements);
     $this->setOption("title", $title);
     $this->addSemanticType("namedGroup");
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct(null);
     $this->addSemanticType('structuralGroup');
 }
Exemplo n.º 7
0
 public function __construct($name = null, $elements = null)
 {
     parent::__construct($name, $elements);
     $this->addSemanticType("row");
 }