src/ProPneu/FrontOffice/FrontBundle/Controller/PpHomeController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\ProPneu\FrontOffice\FrontBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Request;
  5. /**
  6.  * Class PpHomeController
  7.  */
  8. class PpHomeController extends AbstractController
  9. {
  10.     /**
  11.      * Display a page home
  12.      * @return string
  13.      */
  14.     public function indexAction(Request $_request)
  15.     {
  16.         if($this->isGranted('IS_AUTHENTICATED_FULLY')) {
  17.             $_connected_branche $this->getUser()->getPpBranche();
  18.             if($_connected_branche) return $this->redirectToRoute('eternaly_login', [
  19.                 '_branche' => $_connected_branche->getBrcLibelle()
  20.             ]);
  21.         }
  22.         return $this->redirectToRoute('dashboard_index');
  23.     }
  24.    
  25. }