Пример #1
0
 /**
  * Creates a form to delete a Samochod entity.
  *
  * @param Samochod $samochod The Samochod entity
  *
  * @return \Symfony\Component\Form\Form The form
  */
 private function createDeleteForm(Samochod $samochod)
 {
     return $this->createFormBuilder()->setAction($this->generateUrl('samochody_delete', array('id' => $samochod->getId())))->setMethod('DELETE')->getForm();
 }
Пример #2
0
 /**
  * @param Samochod $samochod
  * @return string
  */
 public function orderCount(Samochod $samochod)
 {
     $orders = $this->em->getRepository('AppBundle:Zamowienie')->findBy(['samochod' => $samochod->getId()]);
     return count($orders);
 }