예제 #1
0
 /**
  * @param Form $form
  */
 public function filterFormSubmited(Form $form)
 {
     $values = $form->getValues();
     if ($values->id) {
         $this->filter->setIdsPages(Filter::createFilterArray($values->id));
     }
     if ($values->subquestions) {
         $this->filter->setSubquestions(Filter::createFilterArray($values->subquestions));
     }
     if ($values->correct) {
         $this->filter->setCorrect(Filter::createFilterArray($values->correct));
     }
     if ($values->almost) {
         $this->filter->setAlmost(Filter::createFilterArray($values->almost));
     }
     if ($values->wrong) {
         $this->filter->setWrong(Filter::createFilterArray($values->wrong));
     }
     if ($values->disqualified) {
         $this->filter->setDisqualified(Filter::createFilterArray($values->disqualified));
     }
     if ($values->percentages) {
         $this->filter->setPercentages(Filter::createFilterArray($values->percentages));
     }
     if ($values->order) {
         $order_arr = array();
         foreach ($values->order as $item) {
             if ($item->by && $item->dir) {
                 $order_arr[$item->by] = $item->dir;
             }
         }
         if (count($order_arr) > 0) {
             $this->filter->setOrderBy($order_arr);
         }
     }
     $this->redrawControl();
 }