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");
     }
 }