mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 22:46:13 +00:00
46 lines
1.3 KiB
PHP
46 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\Form\PersonResourceType;
|
|
use Chill\PersonBundle\Repository\PersonRepository;
|
|
use Chill\PersonBundle\Repository\PersonResourceRepository;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
|
|
final class PersonResourceController extends AbstractController
|
|
{
|
|
private PersonResourceRepository $personResourceRepository;
|
|
|
|
public function __construct(
|
|
PersonResourceRepository $personResourceRepository,
|
|
PersonRepository $personRepository
|
|
)
|
|
{
|
|
$this->personResourceRepository = $personResourceRepository;
|
|
$this->personRepository = $personRepository;
|
|
}
|
|
|
|
public function listAction($person_id)
|
|
{
|
|
$person = $this->personRepository->find($person_id);
|
|
|
|
$form = $this->createForm(PersonResourceType::class);
|
|
|
|
return $this->render(
|
|
'ChillPersonBundle:PersonResource:list.html.twig',
|
|
[
|
|
'person' => $person,
|
|
'form' => $form->createView()
|
|
]
|
|
);
|
|
}
|
|
} |