Example #1
0
 /**
  * Index action method
  *
  * @return void
  */
 public function index()
 {
     $this->prepareView('forms/index.phtml');
     $forms = new Model\Form();
     if ($forms->hasPages($this->config->pagination)) {
         $limit = $this->config->pagination;
         $pages = new Paginator($forms->getCount(), $limit);
         $pages->useInput(true);
     } else {
         $limit = null;
         $pages = null;
     }
     $this->view->title = 'Forms';
     $this->view->pages = $pages;
     $this->view->forms = $forms->getAll($limit, $this->request->getQuery('page'), $this->request->getQuery('sort'), $this->application->modules());
     $this->send();
 }