public function hasMnetConnection(GcrEschool $eschool) { $id = $eschool->getId(); foreach ($this->getMnetEschools() as $mnet_eschool) { if ($mnet_eschool->getId() == $id) { return true; } } return false; }