public function profilView($id) { $manager = new ProfilManager(); $manager2 = new Wusers_tagManager(); $profil = $manager->getUserProfil($id); $badges = $manager2->getUserLevel($id); //$this->allowTo('user'); $this->show('default/profil', ['profil' => $profil, 'badges' => $badges]); }
public function question($id) { $manager = new QuestionManager(); $manager2 = new TagManager(); $manager3 = new ProfilManager(); $manager4 = new ReponseManager(); $manager5 = new Wusers_tagManager(); $question = $manager->getQuestion($id); $tags = $manager2->getTags($id); $profils = $manager3->getAllUsers(); $answers = $manager4->getAllAnswers($id); foreach ($answers as $answer) { $wusers_id = $answer['wusers_id']; $badges[$answer['id']] = $manager5->getUserLevel($wusers_id); } $this->show('default/question', ['question' => $question, 'tags' => $tags, 'profils' => $profils, 'answers' => $answers, 'badges' => $badges]); }