コード例 #1
0
ファイル: User.php プロジェクト: emacsattic/symfony
 public function isInterestedIn($question)
 {
     $interest = new Interest();
     $interest->setQuestion($question);
     $interest->setUserId($this->getId());
     $interest->save();
 }
コード例 #2
0
ファイル: BaseQuestion.php プロジェクト: arrisray/askeet
 public function addInterest(Interest $l)
 {
     $this->collInterests[] = $l;
     $l->setQuestion($this);
 }
コード例 #3
0
ファイル: actions.class.php プロジェクト: arrisray/askeet
 public function executeInterested()
 {
     $this->question = QuestionPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($this->question);
     $user = $this->getUser()->getSubscriber();
     $interest = new Interest();
     $interest->setQuestion($this->question);
     $interest->setUser($user);
     $interest->save();
 }