Пример #1
0
 public function createChildControls()
 {
     switch ($this->_type) {
         case self::FILTER_LIST:
             $o = new TListBox();
             //$o->setSelectionMode($this->_selectionMode);
             break;
         case self::FILTER_CHECK:
             $o = new TCheckBoxList();
             break;
         case self::FILTER_DROP:
             $o = new TDropDownList();
             break;
         case self::FILTER_RADIO:
             $o = new TRadioButtonList();
             break;
         default:
             throw new TInvalidDataTypeException('Type of TFilterList must be on of TFilterList::FILTER_LIST, TFilterList::FILTER_CHECK, ' . 'TFilterList::FILTER_DROP, TFilterList::FILTER_RADIO');
             //TODO Put to messages
     }
     $o->setPromptText($this->_promptText);
     $o->setPromptValue($this->_promptValue);
     $o->setId($this->genFilterId());
     $this->_control = $o;
     $this->createLabel($o->getId());
     $this->getControls()->add($o);
 }