public function __construct($spec, $aOptions = array()) { if (isset($aOptions['ajax'])) { $this->_ajax = $aOptions['ajax']; unset($aOptions['ajax']); } parent::__construct($spec, $aOptions); }
public function __construct($spec = '', $options = '') { parent::__construct($spec, $options); $table = new Expertise(); $select = $table->select(); $select->order(Expertise::COL_SPECIES); $rowset = $table->fetchAll($select); $array = $rowset->toArray(); $optArray = array(); foreach ($array as $value) { $merged = $value[Expertise::COL_ID] . ',' . $value[Expertise::COL_AREA] . ',' . $value[Expertise::COL_SPECIES] . ',' . $value[Expertise::COL_SUBJECT]; $optArray = $optArray + array($value[Expertise::COL_ID] => $merged); } $this->setMultiOptions($optArray); }
public function __construct($attributId, $spec = '', $options = '') { parent::__construct($spec, $options); $table = new ValueList(); $select = $table->select(); $select->order(ValueList::COL_NAME); $select->where(ValueList::COL_ATTRIBUTE_DESCRIPTOR_ID . "= ?", $attributId); $rowset = $table->fetchAll($select); $array = $rowset->toArray(); $optArray = array(); foreach ($array as $value) { $optArray = $optArray + array($value[ValueList::COL_ID] => $value[ValueList::COL_NAME]); } $this->setMultiOptions($optArray); }
/** * Constructor * * $spec may be: * - string: name of element * - array: options with which to configure element * - \Zend_Config: \Zend_Config with options for configuring element * * @param string|array|\Zend_Config $spec * @param array|\Zend_Config $options * @return void * @throws \Zend_Form_Exception if no element name after initialization */ public function __construct($spec, $options = null) { parent::__construct($spec, $options); $this->setAttrib('label_class', 'checkbox'); }
public function __construct($spec, $options = null) { parent::__construct($spec, $options); $decoratorDefault = new ZendT_Form_Decorator_Select(); $this->addDecorator($decoratorDefault); }