Exemplo n.º 1
0
 public function addInterest(Interest $l)
 {
     $this->collInterests[] = $l;
     $l->setUser($this);
 }
Exemplo n.º 2
0
 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();
 }