public function commentAction()
 {
     $guest_id = $this->_getParam("guest_id");
     $guestbook = new Application_Model_GuestbookMapper();
     $guest = new Application_Model_Guestbook();
     $this->view->guest = $guestbook->find($guest_id, $guest);
     $this->view->title = "Comment";
 }
Ejemplo n.º 2
0
 public function deleteAction()
 {
     $blog_id = $this->getRequest()->getParam('id');
     if ($blog_id) {
         $mapper = new Application_Model_GuestbookMapper();
         $mapper->delete($blog_id);
     }
     $this->_helper->flashMessenger->addMessage('Deleted');
     return $this->_helper->redirector('index');
 }
Ejemplo n.º 3
0
 public function signAction()
 {
     $request = $this->getRequest();
     $form = new Application_Form_Guestbook();
     if ($request->isPost() && $form->isValid($request->getPost())) {
         $comment = new Application_Model_Guestbook($form->getValues());
         $mapper = new Application_Model_GuestbookMapper();
         $mapper->save($comment);
         return $this->_helper->redirector('index');
     }
     $this->view->form = $form;
 }
Ejemplo n.º 4
0
 public function indexAction()
 {
     $guestbook = new Application_Model_GuestbookMapper();
     $this->view->entries = $guestbook->fetchAll();
 }