public function indexAction()
 {
     $pageNumber = $this->_getParam('page');
     $currentPolling = $this->_getParam('currentPolling');
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if (!empty($post['delete'])) {
             foreach ($post['delete'] as $key => $id) {
                 $this->tbl_polling->find($id)->current()->delete();
             }
         }
     }
     if (null == $currentPolling) {
         $active_polling = $this->tbl_polling->getActivePolling();
         if (sizeof($active_polling)) {
             $currentPolling = $active_polling->polling_id;
         }
     }
     if (null != $currentPolling) {
         $result = $this->tbl_answer->getAllWithResult($currentPolling);
         $this->view->currentPollingResult = $result->toArray();
     }
     $polling = $this->tbl_polling->getAll();
     $paginator = Zend_Paginator::factory($polling);
     $paginator->setCurrentPageNumber($pageNumber);
     $this->view->paginator = $paginator;
 }
  * Desc: Membuat halaman feed dalam format JSon untuk halaman calendar
  */
 public function eventlistAction()
 {
     //get Start date and End date Parameter
     $startDate = $this->unixToMySQL($this->_getParam('start'));
     $endDate = $this->unixToMySQL($this->_getParam('end'));
     //create eventDb Instance
     $eventDb = new Model_DbTable_Event();
     $data = $eventDb->getEventInRange($startDate, $endDate, $this->_languageId);
     if (sizeof($data) > 0) {
         $this->view->list = $this->formatFullCalendar($data->toArray());
     } else {
         $this->view->fake = array();
     }
     $this->view->layout()->disableLayout();
     $this->render('generate-event');
 }