protected function createComponentSearchForm()
 {
     if ($this->searchRequest->groups) {
         $groups = array_fill_keys($this->searchRequest->groups, true);
     } else {
         $groups = array();
         foreach ($this->context->groups->getList() as $group) {
             $groups[$group->id] = true;
         }
     }
     $form = new SearchForm($this->context->groups);
     $form->setDefaults(array('s' => $this->getParameter('s'), 'from' => $this->searchRequest ? $this->searchRequest->from : null, 'groups' => $groups));
     $form->onSuccess[] = callback($form, 'submitted');
     return $form;
 }