This commit is contained in:
Sergio Álvarez 2022-05-23 15:53:20 +02:00
parent 1c542e3455
commit 7f97b7c5a9
No known key found for this signature in database
GPG Key ID: 622780889DFDBDA5
2 changed files with 5 additions and 4 deletions

View File

@ -2,9 +2,7 @@
namespace App\Controller;
use App\Entity\MerParaSub;
use App\Repository\MerParaSubRepository;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
@ -15,8 +13,8 @@ class IndexController extends AbstractController
#[Route('/', name: 'app_index')]
public function index(Entity1Repository $repo, MerParaSubRepository $subRepo): Response
{
// repo dummy
$sm = $repo->getSchemaManager();
$entity8 = $repo->findOneByName('entity 8');
$sub = $subRepo->findOne();
dump($sub);
@ -24,7 +22,6 @@ class IndexController extends AbstractController
return $this->render('index/index.html.twig', [
'controller_name' => 'IndexController',
'entity8' => $entity8,
'schemaManager' => $sm
]);
}

View File

@ -37,6 +37,10 @@ class MerFixtures extends Fixture
$sub->setService($tmp)->setRedCode('redcode1')->setSubDate(new \DateTimeImmutable('now'));
$manager->persist($sub);
$sub = new MerParaSub();
$sub->setService($tmp)->setRedCode('redcode2')->setSubDate(new \DateTimeImmutable('now'));
$manager->persist($sub);
$manager->flush();
}
}