ynh_extension_meeo/actions/ElevesAction.php
2024-07-17 11:31:56 +02:00

23 lines
No EOL
511 B
PHP

<?php
use YesWiki\Core\YesWikiAction;
use YesWiki\Bazar\Service\EntryManager;
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]);
return $this->render('@meeo/edu_eleves.twig', ['eleves' => $eleves]);
}
}