Skip to content

Commit

Permalink
don't use global extension as it's breaking commands when schema isn'…
Browse files Browse the repository at this point in the history
…t synchronized
  • Loading branch information
Leny Bernard authored and lenybernard committed May 1, 2018
1 parent c104225 commit efdf1a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 44 deletions.
5 changes: 0 additions & 5 deletions Bundle/ConfigBundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ services:
arguments: ["@victoire_core.admin_menu_builder"]
tags:
- { name: kernel.event_listener, event: victoire_core.build_menu, method: addGlobal, priority: 70 }
Victoire\Bundle\ConfigBundle\Twig\Extension\ConfigExtension:
arguments:
- "@doctrine.orm.entity_manager"
tags:
- { name: twig.extension }
Victoire\Bundle\ConfigBundle\Favicon\FaviconConfigDumper:
arguments: ['@twig', '%assetic.read_from%']
Victoire\Bundle\ConfigBundle\Favicon\FaviconGenerator:
Expand Down
38 changes: 0 additions & 38 deletions Bundle/ConfigBundle/Twig/Extension/ConfigExtension.php

This file was deleted.

5 changes: 4 additions & 1 deletion Bundle/PageBundle/Helper/PageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Victoire\Bundle\BusinessPageBundle\Entity\BusinessPage;
use Victoire\Bundle\BusinessPageBundle\Entity\BusinessTemplate;
use Victoire\Bundle\BusinessPageBundle\Helper\BusinessPageHelper;
use Victoire\Bundle\ConfigBundle\Entity\GlobalConfig;
use Victoire\Bundle\CoreBundle\Entity\EntityProxy;
use Victoire\Bundle\CoreBundle\Entity\Link;
use Victoire\Bundle\CoreBundle\Entity\View;
Expand Down Expand Up @@ -273,12 +274,14 @@ public function renderPage($view, $layout = null)
//Determine which layout to use
$layout = $this->guessBestLayoutForView($view);
}
$globalConfig = $this->entityManager->getRepository(GlobalConfig::class)->findLast() ?: new GlobalConfig();

//Create the response
$response = $this->container->get('templating')->renderResponse('VictoireCoreBundle:Layout:'.$layout.'.html.twig', [
'view' => $view,
'globalConfig' => $globalConfig,
'victoire_i18n_available_locales' => $this->availableLocales,
'victoire_twig_responsive' => $this->twigResponsive,
'view' => $view,
]);

return $response;
Expand Down

0 comments on commit efdf1a5

Please sign in to comment.