/** * @Route("/regions/{id}/get-teams", name="region_teams") */ public function getRegionTeamsAction(Region $region) { $sm = new SubscriptionManager($this->get('app.whoscored'), $this->getDoctrine()->getManager()); $sm->getRegionTeams($region); $this->addFlash('notice', 'Downloaded teams from region ' . $region->getName()); return $this->redirectToRoute('homepage'); }