Beispiel #1
0
 public function init()
 {
     $id = $this->settingService->get('ga_profile_id');
     if (!$id) {
         $this->error = 'Missing GA profil ID!';
         return;
     }
     $this->analyticsService->setProfileId($id);
     parent::init();
 }
 /**
  * @Route("/check_analytics", name="Check Analytics Profile")
  */
 public function indexAction(Request $request)
 {
     if ($request->query->get('profile_id')) {
         $profileId = $request->query->get('profile_id');
         $this->analyticsService = $this->get('AnalyticsService');
         $this->analyticsService->setProfileId($profileId);
         $this->analyticsService->checkProfile();
     }
     // replace this example code with whatever you need
     return $this->render('default/index.html.twig', array());
 }