protected function addSelect($name, $label, array $values) { $select = new Element\Select($name); $select->setLabel($label); $select->setLabelAttributes(array('class' => "col-sm-{$this->labelWidth}")); $select->setOption('column-size', "sm-{$this->controlWidth}"); $select->setValueOptions($values); if ($this->compact) { $select->setAttribute('class', 'input-sm'); } $this->add($select); return $this; }
/** * @param string $key * @param mixed $value * @return self */ public function setOption($key, $value) { $this->getProxy()->setOptions(array($key => $value)); return parent::setOption($key, $value); }