get('meeo'); $this->wiki = $wiki; $this->formId = $meeo_config['elevesFormId']; $this->entryManager = $entryManager; $this->listManager = $listManager; } public function del($id) { $this->entryManager->delete($id); } public function updateEleve(Eleve $eleve) { $id = $eleve->getId(); $data = $eleve->getData(); $data['antispam'] = true; echo var_dump($data); return $this->entryManager->update($id, $data); } public function getAll() { $eleves = []; foreach ($this->entryManager->search(['formsIds' => $this->formId]) as $data) { $eleve = new Eleve($this->entryManager, $data); // echo "
".var_dump($eleve)."
"; $eleves[] = $eleve; } return $eleves; } public function getEleve(string $id) { return new Eleve($this->entryManager, $this->entryManager->getOne($id)); } public function getCurrentEleve(string $username) { return $this->entryManager->getOne(str_replace(".","", $username)); } public function view() { $eleves = $this->getAll(); // echo ''.var_dump($eleves).'
'; $classes = $this->listManager->getOne('ListeClasses'); // echo "".var_dump($classes)."
"; return $this->wiki->render('@meeo/edu_eleves.twig', ['eleves' => $eleves, 'classes' => $classes['nodes']]); } }