I am trying to separate data access from my controllers in a Symfony 3 application. Symfony allows Doctrine mediated DB queries to be made via a repository class that extends the EntityRepository class, but I'm having trouble finding a way to persist objects to the DB outside of a class that inherits from the controller base class. Simply put: How can I persist an Entity object to a DB via Doctrine outside of a controller in Symfony?
Thanks for your help.