mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-24 17:22:06 +01:00
44 lines
951 B
PHP
44 lines
951 B
PHP
<?php
|
|
|
|
|
|
namespace AppBundle\Controller;
|
|
|
|
use Afup\Site\Utils\Configuration;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
abstract class SiteBaseController extends Controller implements SiteControllerInterface
|
|
{
|
|
protected $defaultBlocks = [];
|
|
|
|
/**
|
|
* @var Configuration
|
|
*/
|
|
protected $legacyConfiguration;
|
|
|
|
/**
|
|
* @inheritDoc
|
|
* @deprecated use BlocksHandler
|
|
*/
|
|
public function setDefaultBlocks(array $blocks)
|
|
{
|
|
$this->defaultBlocks = $blocks;
|
|
}
|
|
|
|
/**
|
|
* @param Configuration $conf
|
|
*/
|
|
public function setConfiguration(Configuration $conf)
|
|
{
|
|
$this->legacyConfiguration = $conf;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
protected function render($view, array $parameters = [], Response $response = null)
|
|
{
|
|
return parent::render($view, $parameters + $this->defaultBlocks, $response);
|
|
}
|
|
}
|