Beispiel #1
0
 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;
 }
Beispiel #2
0
 /**
  * @param string $key
  * @param mixed $value
  * @return self
  */
 public function setOption($key, $value)
 {
     $this->getProxy()->setOptions(array($key => $value));
     return parent::setOption($key, $value);
 }