ynh_extension_meeo/actions/ElevesAction.php

23 lines
511 B
PHP
Raw Normal View History

2024-07-17 09:31:56 +00:00
<?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]);
}
}