X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/f4334bf103ec3b821270b61e270f9222a5c3d495..832be89c5836f1f58e4e8ef89587ddcf1bd68c9c:/Controller/AbstractController.php diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index a859e5a..9f771e6 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -41,9 +41,9 @@ use Rapsys\PackBundle\Util\SluggerUtil; use Rapsys\UserBundle\RapsysUserBundle; /** - * Provides common features needed in controllers. - * * {@inheritdoc} + * + * Provides common features needed in controllers. */ abstract class AbstractController extends BaseAbstractController implements ServiceSubscriberInterface { /** @@ -66,6 +66,11 @@ abstract class AbstractController extends BaseAbstractController implements Serv */ protected int $page; + /** + * Request instance + */ + protected Request $request; + /** * Abstract constructor * @@ -263,9 +268,9 @@ abstract class AbstractController extends BaseAbstractController implements Serv } /** - * Renders a view - * * {@inheritdoc} + * + * Renders a view */ protected function render(string $view, array $parameters = [], Response $response = null): Response { //Create response when null @@ -277,17 +282,6 @@ abstract class AbstractController extends BaseAbstractController implements Serv $parameters['locale'] = $this->locale; } - /*TODO: XXX: to drop, we have title => [ 'page' => XXX, section => XXX, site => XXX ] - //With empty head title and section - if (empty($parameters['head']['title']) && !empty($parameters['section'])) { - //Set head title - $parameters['title'] = implode(' - ', [$parameters['title'], $parameters['section'], $parameters['head']['site']]); - //With empty head title - } elseif (empty($parameters['head']['title'])) { - //Set head title - $parameters['head']['title'] = implode(' - ', [$parameters['title'], $parameters['head']['site']]); - }*/ - //Call twig render method $content = $this->twig->render($view, $parameters);