mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
route and menu entry added in person menu + start of templates/controller
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?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\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)
|
||||
{
|
||||
dump($person_id);
|
||||
$person = $this->personRepository->find($person_id);
|
||||
dump($person);
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:list.html.twig',
|
||||
[
|
||||
'person' => $person
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user