Example #1
0
 /**
  * @param Budget $budget
  */
 public function setBudget(Budget $budget)
 {
     $this->budget = $budget;
     $this->budgetname = $budget->getName();
 }
Example #2
0
 /**
  * @param Budget $budget
  * @return bool
  */
 public function isInvited(Budget $budget)
 {
     foreach ($this->invitationsReceived as $i) {
         if (in_array($i->getStatus(), array('accepted', 'pending', 'manager')) && $i->getBudget()->getId() == $budget->getId()) {
             return true;
         }
     }
     return false;
 }