src/Controller/AppDemoController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Service\AppService;
  4. class AppDemoController extends BaseController
  5. {
  6.     private $_appService;
  7.     
  8.     public function __construct(AppService $appService)
  9.     {
  10.         $this->_appService $appService;
  11.     }
  12.     public function index()
  13.     {
  14.         if ($this->_appService->isMobileApp())
  15.             $view 'AppDemo/mobileIndex.html.twig';
  16.         else
  17.             $view 'AppDemo/index.html.twig';
  18.         
  19.         return $this->render($view);
  20.     }
  21. }