Use $this->getDoctrine()->getManager()
instead.
Actually, it’s best not to make controllers aware of the persistence layer you’re using. That stuff should be moved to the Service Layer to abstract the way the data is persisted.
Use $this->getDoctrine()->getManager()
instead.
Actually, it’s best not to make controllers aware of the persistence layer you’re using. That stuff should be moved to the Service Layer to abstract the way the data is persisted.