Exemplo n.º 1
0
 public function actionStatsgenerales()
 {
     if (!Yii::$app->getUser()->isGuest) {
         $statsRepository = new StatsRepository();
         $itemRepo = new ItemRepository();
         $current_stats = $statsRepository->getGlobalData();
         $matieres = $itemRepo->getAllMatieres();
         return $this->render('statsglobales', ['weeks' => $current_stats['weeks'], 'months' => $current_stats['months'], 'matieres' => $matieres]);
     } else {
         Yii::$app->session->setFlash('error', 'Please log in to acces the website features.');
         $this->redirect(BASE_URL . 'web/index.php/site/login');
     }
 }
Exemplo n.º 2
0
 public function actionTest()
 {
     $statsRepository = new StatsRepository();
     $statsRepository->initAll();
 }