/**
  * @param Category $category
  * @return \Symfony\Component\Form\Form
  */
 protected function createDeleteForm(Category $category)
 {
     $form = $this->createFormBuilder();
     $form->setAction($this->generateUrl('category_delete', ['id' => $category->getId()]))->setMethod('DELETE');
     return $form->getForm();
 }
Beispiel #2
0
 /**
  * Add categories
  *
  * @param \Koopa\AppBundle\Entity\Category $categories
  * @return Info
  */
 public function addCategory(\Koopa\AppBundle\Entity\Category $category)
 {
     $this->categories[] = $category;
     $category->addInfo($this);
     return $this;
 }