<?php
namespace App\Controller;
use App\Service\AppService;
class PageController extends BaseController
{
private $_appService;
public function __construct(AppService $appService)
{
$this->_appService = $appService;
}
public function termsAndConditions()
{
if ($this->_appService->isMobileApp())
$view = 'Page/termsAndConditionsMobile.html.twig';
else
$view = 'Page/termsAndConditions.html.twig';
return $this->render($view);
}
public function privacyPolicy()
{
if ($this->_appService->isMobileApp())
$view = 'Page/privacyPolicyMobile.html.twig';
else
$view = 'Page/privacyPolicy.html.twig';
return $this->render($view);
}
public function presale()
{
if ($this->_appService->isMobileApp())
$view = 'Page/presaleMobile.html.twig';
else
throw $this->createNotFoundException();
return $this->render($view);
}
}