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; }
/** * @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); } }
/** * * @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"); }
public function __construct($proxyName = null) { parent::__construct(null); $this->proxyName = $proxyName; }
public function __construct($title = null, $name = null, $elements = []) { parent::__construct($name, $elements); $this->setOption("title", $title); $this->addSemanticType("namedGroup"); }
public function __construct() { parent::__construct(null); $this->addSemanticType('structuralGroup'); }
public function __construct($name = null, $elements = null) { parent::__construct($name, $elements); $this->addSemanticType("row"); }