public function beforeFilter() { parent::beforeFilter(); $this->Favorite->setSession($this->Session); }