public function buildFilter() { // Добавление полей цены объекта DomstorPriceConstructor::add($this->_form); // Добавление поля района (зависит от типа местоположения) DomstorDistrictConstructor::add($this->_form, $this->_domstor); if (!$this->_domstor->inRegion()) { DomstorSuburbanConstructor::add($this->_form, $this->_domstor); } // Назначение $purpose = new SP_Form_Field_CheckboxList(); $options = array('1002' => 'Торговое', '1003' => 'Офисное', '1005' => 'Производственное', '1006' => 'Складское', '1009' => 'Земельный участок', '1008' => 'Имущественный комплекс', '1007' => 'Прочие'); $purpose->setName('purpose')->setLabel('Назначение:')->setOptions($options)->setLayoutClass('domstor_filter_dropdown')->setLabelClass('domstor_filter_trigger')->isDropDown(FALSE); // Площадь участка DomstorSquareGroundConstructor::add($this->_form); // Площадь помещения DomstorSquareHouseConstructor::add($this->_form); // Добавление полей в форму $this->_form->addFields(array($purpose)); return $this->_form; }
public function renderCheckboxLabel($key, $option) { $option = $option['name']; return parent::renderCheckboxLabel($key, $option); }