This commit is contained in:
2022-05-23 20:40:22 +02:00
parent 703ef3c5b1
commit b58b92bc30
14 changed files with 390 additions and 92 deletions

View File

@ -2,8 +2,11 @@
namespace App\Controller;
use App\Repository\MerBeSubRepository;
use App\Repository\MerParaSubRepository;
use App\Repository\MerServiceRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\Entity1Repository;
@ -11,18 +14,38 @@ use App\Repository\Entity1Repository;
class IndexController extends AbstractController
{
#[Route('/', name: 'app_index')]
public function index(Entity1Repository $repo, MerParaSubRepository $subRepo): Response
public function index(
Entity1Repository $repo,
MerParaSubRepository $paraSubRepo,
MerBeSubRepository $beSubRepo
): Response
{
// repo dummy
$sm = $repo->getSchemaManager();
$sub = $subRepo->findOne();
dump($sub);
dump($sub->getService());
foreach ($paraSubRepo->findAll() as $sub) {
dump($sub);
}
dump('-------------------');
foreach ($beSubRepo->findAll() as $sub) {
dump($sub);
}
return $this->render('index/index.html.twig', [
'controller_name' => 'IndexController',
'schemaManager' => $sm
'schemaManager' => $sm,
//'offer_id' => $sub->getService()->ge
]);
}
#[Route('/notification/dm', name: 'notification_dm')]
public function notificationDm(Request $request, MerServiceRepository $repo): Response
{
foreach ($repo->findByOfferId($request->query->get('offer_id')) as $sub) {
dump($sub);
}
return $this->render('index/notificationDm.html.twig');
}
}