From d5e1ee300940dc082d69efc1a2730048c0c281b1 Mon Sep 17 00:00:00 2001 From: Guillaume Manen Date: Mon, 14 Apr 2014 16:16:00 +0200 Subject: [PATCH] refacto context --- Controller/BaseController.php | 2 ++ Controller/CrudController.php | 1 - Resources/assets/js/bootstrap.confirm.js | 2 +- Theme/Section/FooterSection.php | 4 ---- Theme/Section/HeaderSection.php | 5 ----- Theme/Theme.php | 4 ---- 6 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Controller/BaseController.php b/Controller/BaseController.php index e466aa6..d0dfe4c 100644 --- a/Controller/BaseController.php +++ b/Controller/BaseController.php @@ -2,6 +2,7 @@ namespace Bigfoot\Bundle\CoreBundle\Controller; +use Bigfoot\Bundle\ContextBundle\Entity\ContextRepository; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Security\Core\SecurityContext; @@ -223,6 +224,7 @@ protected function getUserManager() /** * Get the context repository + * @return ContextRepository */ protected function getContextRepository() { diff --git a/Controller/CrudController.php b/Controller/CrudController.php index cb7bbee..cbab55c 100644 --- a/Controller/CrudController.php +++ b/Controller/CrudController.php @@ -266,7 +266,6 @@ protected function getGlobalActions() */ protected function doIndex() { - $context = 'gaumont'; $entityClass = ltrim($this->getEntityClass(), '\\'); $query = $this diff --git a/Resources/assets/js/bootstrap.confirm.js b/Resources/assets/js/bootstrap.confirm.js index 8bf9fc0..6af5aa3 100644 --- a/Resources/assets/js/bootstrap.confirm.js +++ b/Resources/assets/js/bootstrap.confirm.js @@ -8,7 +8,7 @@ { var confirmLink = $(this); modalEvent.preventDefault(); - var targetData = $(modalEvent.target).data();console.log(targetData); + var targetData = $(modalEvent.target).data(); var modal = Twig.render(confirmModal, targetData); confirmContainer.html(modal); diff --git a/Theme/Section/FooterSection.php b/Theme/Section/FooterSection.php index 4c6a6f3..80fc0e3 100644 --- a/Theme/Section/FooterSection.php +++ b/Theme/Section/FooterSection.php @@ -21,9 +21,5 @@ public function getName() */ protected function setDefaultParameters() { - $themeValues = $this->container->getParameter('bigfoot.theme.values'); - $this->parameters = array( - 'title' => $themeValues['provided_by'], - ); } } diff --git a/Theme/Section/HeaderSection.php b/Theme/Section/HeaderSection.php index 3ee32da..c500700 100644 --- a/Theme/Section/HeaderSection.php +++ b/Theme/Section/HeaderSection.php @@ -21,10 +21,5 @@ public function getName() */ protected function setDefaultParameters() { - $themeValues = $this->container->getParameter('bigfoot.theme.values'); - $this->parameters = array( - 'title' => $themeValues['title'], - 'subtitle' => $themeValues['subtitle'], - ); } } diff --git a/Theme/Theme.php b/Theme/Theme.php index 149cc8e..ac403c0 100644 --- a/Theme/Theme.php +++ b/Theme/Theme.php @@ -45,10 +45,6 @@ class Theme implements ArrayAccess */ public function __construct(Container $container, Section\ToolbarSection $toolbar, Section\HeaderSection $header, Section\SidebarSection $sidebar, Section\PageHeaderSection $pageHeader, Section\PageContentSection $pageContent, Section\FooterSection $footer) { - $themeValues = $container->getParameter('bigfoot.theme.values'); - $header->setParameter('title', $themeValues['title']); - $header->setParameter('subtitle', $themeValues['subtitle']); - $sections = array(); $sections[] = $toolbar; $sections[] = $header;