mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
namespace Chill\PersonBundle\Controller;
|
|
|
|
use Chill\PersonBundle\Repository\AccompanyingPeriodRepository;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
class UserAccompanyingPeriodController extends AbstractController
|
|
{
|
|
|
|
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
|
|
|
|
public function __construct(AccompanyingPeriodRepository $accompanyingPeriodRepository)
|
|
{
|
|
$this->accompanyingPeriodRepository = $accompanyingPeriodRepository;
|
|
}
|
|
|
|
/**
|
|
* @Route("/{_locale}/accompanying-periods", name="chill_person_accompanying_period_user")
|
|
*/
|
|
public function listAction(Request $request)
|
|
{
|
|
$accompanyingPeriods = [];
|
|
$accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(['user' => $this->getUser()]);
|
|
|
|
return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [
|
|
'accompanyingPeriods' => $accompanyingPeriods
|
|
]);
|
|
|
|
}
|
|
} |