Пример #1
0
 /**
  * @param string $type type of the input (text, password, radio,...)
  * @param string $name name of the input in the form
  * @param array $attributes
  * @param Validator[] $validators
  * @param Filter[] $filters
  */
 public function __construct($type, $name, $attributes = null, $validators = null, $filters = null)
 {
     parent::__construct($name, $attributes, $validators, $filters);
     $this->inputType = $type;
     $this->addSemanticType("input");
     $this->addSemanticType("input:{$type}");
 }
Пример #2
0
 /**
  * \UForm\Form\Element constructor
  *
  * @param string $name
  * @param array|null $values
  * @param array|null $attributes
  */
 public function __construct($name, array $values = null, $attributes = null)
 {
     parent::__construct($name, $attributes);
     $this->rootGroup = new OptGroup("");
     $this->rootGroup->setSelect($this);
     if (null !== $values) {
         $this->setOptionValues($values);
     }
 }
Пример #3
0
 /**
  * \UForm\Form\Element constructor
  *
  * @param string $name
  * @param array|null $values
  * @param array|null $attributes
  */
 public function __construct($name, array $values = null)
 {
     parent::__construct($name);
     $this->rootGroup = new OptGroup('');
     $this->rootGroup->setSelect($this);
     if (null !== $values) {
         $this->setOptionValues($values);
     }
     $this->addSemanticType('select');
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct(null);
 }
Пример #5
0
 public function __construct($name, $attributes = null, $validators = null, $filters = null)
 {
     parent::__construct($name, $attributes, $validators, $filters);
     $this->addSemanticType("textarea");
 }
Пример #6
0
 /**
  * @param string $type type of the input (text, password, radio,...)
  * @param string $name name of the input in the form
  * @param array $attributes
  * @param Validator[] $validators
  * @param Filter[] $filters
  */
 public function __construct($type, $name)
 {
     parent::__construct($name);
     $this->inputType = $type;
     $this->addSemanticType('input');
 }
Пример #7
0
 public function __construct($name)
 {
     parent::__construct($name);
     $this->addSemanticType('textarea');
 }