public function addDetailAction()
 {
     Misc_Utils::addToFavorites($this->getRequest()->getParam("id"));
     echo '<a id="p' . $this->getRequest()->getParam("id") . '" href="#" onclick="return removeFromFavoritesDetail(' . $this->getRequest()->getParam("id") . ')"
         title="Remove from favorites">Remove from favorites</a>';
     exit;
 }
Exemplo n.º 2
0
 public function init()
 {
     $this->view->controller = $this->getRequest()->getControllerName();
     $this->view->action = $this->getRequest()->getActionName();
     if ($this->getRequest()->getParam("removeFromFavorites") != null) {
         Misc_Utils::removeFromFavorites($this->getRequest()->getParam("removeFromFavorites"));
         $this->_redirect("/my-favorites");
         exit;
     } elseif ($this->getRequest()->getParam("addToFavorites") != null) {
         Misc_Utils::addToFavorites($this->getRequest()->getParam("addToFavorites"));
         $this->_redirect("/my-favorites");
         exit;
     }
 }