Skip to content

Commit

Permalink
refacto context
Browse files Browse the repository at this point in the history
  • Loading branch information
gmanen committed Apr 14, 2014
1 parent b0df468 commit d5e1ee3
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 15 deletions.
2 changes: 2 additions & 0 deletions Controller/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -223,6 +224,7 @@ protected function getUserManager()

/**
* Get the context repository
* @return ContextRepository
*/
protected function getContextRepository()
{
Expand Down
1 change: 0 additions & 1 deletion Controller/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ protected function getGlobalActions()
*/
protected function doIndex()
{
$context = 'gaumont';
$entityClass = ltrim($this->getEntityClass(), '\\');

$query = $this
Expand Down
2 changes: 1 addition & 1 deletion Resources/assets/js/bootstrap.confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions Theme/Section/FooterSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,5 @@ public function getName()
*/
protected function setDefaultParameters()
{
$themeValues = $this->container->getParameter('bigfoot.theme.values');
$this->parameters = array(
'title' => $themeValues['provided_by'],
);
}
}
5 changes: 0 additions & 5 deletions Theme/Section/HeaderSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
);
}
}
4 changes: 0 additions & 4 deletions Theme/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5e1ee3

Please sign in to comment.