2022-05-21 10:32:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Controller;
|
|
|
|
|
2022-05-23 13:22:36 +00:00
|
|
|
use App\Entity\MerParaSub;
|
|
|
|
use App\Repository\MerParaSubRepository;
|
2022-05-22 16:01:54 +00:00
|
|
|
use Doctrine\ORM\EntityManager;
|
2022-05-21 10:32:17 +00:00
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
use App\Repository\Entity1Repository;
|
|
|
|
|
|
|
|
class IndexController extends AbstractController
|
|
|
|
{
|
|
|
|
#[Route('/', name: 'app_index')]
|
2022-05-23 13:22:36 +00:00
|
|
|
public function index(Entity1Repository $repo, MerParaSubRepository $subRepo): Response
|
2022-05-21 10:32:17 +00:00
|
|
|
{
|
2022-05-22 16:01:54 +00:00
|
|
|
$sm = $repo->getSchemaManager();
|
2022-05-21 10:32:17 +00:00
|
|
|
$entity8 = $repo->findOneByName('entity 8');
|
|
|
|
|
2022-05-23 13:22:36 +00:00
|
|
|
$sub = $subRepo->findOneById(1);
|
|
|
|
dump($sub);
|
|
|
|
dump($sub->getService());
|
|
|
|
|
2022-05-21 10:32:17 +00:00
|
|
|
return $this->render('index/index.html.twig', [
|
|
|
|
'controller_name' => 'IndexController',
|
2022-05-22 16:01:54 +00:00
|
|
|
'entity8' => $entity8,
|
|
|
|
'schemaManager' => $sm
|
2022-05-21 10:32:17 +00:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|