route and menu entry added in person menu + start of templates/controller

This commit is contained in:
2022-01-18 13:55:09 +01:00
parent 48c3432191
commit b31cc460fa
6 changed files with 155 additions and 0 deletions

View File

@@ -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
]
);
}
}