public function __construct(sfActions $actions)
 {
     $this->_actions = $actions;
     $this->_sympalContext = $actions->getSympalContext();
     $this->_user = $actions->getUser();
     $this->_response = $actions->getResponse();
     $this->_request = $actions->getRequest();
     $this->_dispatcher = $this->_sympalContext->getSymfonyContext()->getConfiguration()->getEventDispatcher();
 }
示例#2
0
文件: Utils.php 项目: HHirano/TEST100
 public static function processAction(sfActions $action)
 {
     if ($action->getRequest()->hasParameter("removeFromFavorites")) {
         self::removeFromFavorites($action->getRequest()->getParameter("removeFromFavorites"));
         $action->redirect("my-favorites/index");
     } elseif ($action->getRequest()->hasParameter("addToFavorites")) {
         self::addToFavorites($action->getRequest()->getParameter("addToFavorites"));
         $action->redirect("my-favorites/index");
     }
 }