public function create($data) { $em = $this->getEntityManager(); $restaurant = new Restaurant(); $restaurant->setName($data['name']); $em->persist($restaurant); $em->flush(); return $restaurant; }
/** * {@inheritDoc} */ public function getReservations() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getReservations', array()); return parent::getReservations(); }