get('contract.invoice'); $invoice = new Invoice($contract, $em->getRepository('PlusquamContractBundle:Contract')); } }