public function removeDetailAction() { Misc_Utils::removeFromFavorites($this->getRequest()->getParam("id")); echo '<a id="p' . $this->getRequest()->getParam("id") . '" href="#" onclick="return addToFavoritesDetail(' . $this->getRequest()->getParam("id") . ')" title="Add to favorites">Add to favorites</a>'; exit; }
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; } }