2024-07-17 09:31:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use YesWiki\Core\YesWikiAction;
|
|
|
|
use YesWiki\Bazar\Service\EntryManager;
|
2024-07-17 15:23:33 +00:00
|
|
|
use YesWiki\Bazar\Service\ListManager;
|
2024-07-17 09:31:56 +00:00
|
|
|
|
|
|
|
class ElevesAction extends YesWikiAction
|
|
|
|
{
|
|
|
|
public function formatArguments($arg)
|
|
|
|
{
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
$meeo_config = $this->params->get('meeo');
|
|
|
|
$formId = $meeo_config['elevesFormId'];
|
|
|
|
|
|
|
|
$entryManager = $this->getService(EntryManager::class);
|
|
|
|
$eleves = $entryManager->search(['formsIds' => $formId]);
|
2024-07-17 15:23:33 +00:00
|
|
|
// echo '<p>'.var_dump($eleves).'</p>';
|
2024-07-17 09:31:56 +00:00
|
|
|
|
2024-07-17 15:23:33 +00:00
|
|
|
$listManager = $this->getService(ListManager::class);
|
|
|
|
$classes = $listManager->getOne('ListeClasses');
|
|
|
|
|
|
|
|
return $this->render('@meeo/edu_eleves.twig', ['eleves' => $eleves, 'classes' => $classes['label']]);
|
2024-07-17 09:31:56 +00:00
|
|
|
}
|
|
|
|
}
|