public function load(ObjectManager $manager) { $faker = Factory::create(); $service = new Service(); $service->setName('Internet')->setSlug('internet')->setDescription($faker->text($maxNbChars = 350)); $manager->persist($service); $service = new Service(); $service->setName('Intranet')->setSlug('intranet')->setDescription($faker->text($maxNbChars = 350)); $manager->persist($service); $manager->flush(); }
/** * Set service * * @param \Koopa\AppBundle\Entity\Service $service * @return Support */ public function setService(\Koopa\AppBundle\Entity\Service $service) { $this->service = $service; $service->addSupport($this); return $this; }
/** * Set service * * @param \Koopa\AppBundle\Entity\Service $service * @return Comment */ public function setService(\Koopa\AppBundle\Entity\Service $service = null) { $this->service = $service; $service->addComment($this); return $this; }
/** * @param Service $service * @return \Symfony\Component\Form\Form */ protected function createDeleteForm(Service $service) { $form = $this->createFormBuilder(); $form->setAction($this->generateUrl('service_delete', ['id' => $service->getId()]))->setMethod('DELETE'); return $form->getForm(); }