コード例 #1
0
 /** The index action
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getFrontContent('index');
     $form = new SolrForm();
     $form->setAttrib('class', 'form-inline');
     $this->view->form = $form;
     $form->removeElement('thumbnail');
     $form->removeElement('3D');
     $form->q->removeDecorator('label');
     $form->q->setAttrib('class', 'input-large');
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $params = array_filter($form->getValues());
             unset($params['csrf']);
             $this->getFlash()->addMessage('Your search is complete');
             $this->_helper->Redirector->gotoSimple('results', 'search', 'database', $params);
         } else {
             $form->populate($form->getValues());
         }
     }
 }