Esempio n. 1
0
 /**
  * Delete Action
  *
  * @return void
  */
 public function deleteAction()
 {
     $id = $this->_getParam('id');
     $this->view->headTitle()->prepend('Delete');
     $entry = $this->_entryMapper->getEntry($id);
     if (null === $entry) {
         throw new Zend_Controller_Dispatcher_Exception();
     }
     $this->_entryMapper->deleteEntry($entry);
     $this->_redirect($this->_router->assemble(array('action' => 'index', 'controller' => 'entry'), null, true));
 }
Esempio n. 2
0
 /**
  * Assembles a URL based on a given route
  *
  * This method will typically be used for more complex operations, as it
  * ties into the route objects registered with the router.
  *
  * @param  array   $urlOptions
  * @param  mixed   $name
  * @param  boolean $reset
  * @param  boolean $encode
  * @return string Url for the link href attribute.
  */
 public function url($urlOptions = array(), $name = null, $reset = false, $encode = true)
 {
     return $this->_router->assemble($urlOptions, $name, $reset, $encode);
 }