<?php
namespace App\Controller;
use App\Privilege\RoleFactoryInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("", name="main")
*/
class MainController extends AbstractController
{
/**
* @Route("", name="")
*/
public function index(): Response
{
if ($this->isGranted(RoleFactoryInterface::IS_AUTHENTICATED_FULLY)) {
return $this->redirectToRoute('subject_search');
}
return $this->render('main/index.html.twig');
}
/**
* @Route("/regulations", name="_regulations")
*/
public function regulations(): Response
{
return $this->render('main/regulations.html.twig');
}
}