symfony-playground/src/Controller/IndexController.php

29 lines
779 B
PHP
Raw Normal View History

2022-05-21 10:32:17 +00:00
<?php
namespace App\Controller;
2022-05-23 13:22:36 +00:00
use App\Repository\MerParaSubRepository;
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-23 13:53:20 +00:00
// repo dummy
2022-05-22 16:01:54 +00:00
$sm = $repo->getSchemaManager();
2022-05-21 10:32:17 +00:00
2022-05-23 13:34:24 +00:00
$sub = $subRepo->findOne();
2022-05-23 13:22:36 +00:00
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
'schemaManager' => $sm
2022-05-21 10:32:17 +00:00
]);
}
}