/** * @param Contact $contact */ public function addAssociate(Contact $contact) { if (!$this->associate->contains($contact)) { $this->associate->add($contact); } }
/** * New function needed to make the hydrator happy * * @param Collections\Collection $communityCollection */ public function addCommunity(Collections\Collection $communityCollection) { foreach ($communityCollection as $community) { $community->contact = $this; $this->community->add($community); } }