/** * \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); } }
/** * \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'); }