private function create() { $contacts = new Contacts(); $contacts->setPhones("Телефоны"); $contacts->setEmail("Email"); $contacts->setSkype("Skype"); $contacts->setMapCode(""); $contacts->setMapPointHint(""); $contacts->setMapPointInformation(""); $contacts->setMapX(""); $contacts->setMapY(""); $contacts->setRegistrationData(""); $contacts->setSkype(""); $contacts->setUpdateAt(new \DateTime()); $em = $this->getDoctrine()->getManager(); $em->persist($contacts); $em->flush(); return $contacts; }
/** * Creates a form to delete a Contacts entity. * * @param Contacts $contact The Contacts entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(Contacts $contact) { return $this->createFormBuilder()->setAction($this->generateUrl('contacts_delete', array('id' => $contact->getId())))->setMethod('DELETE')->getForm(); }