Skip to content

Commit

Permalink
[Menu] Fix menu filter in twig extension
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed Nov 3, 2015
1 parent 747f963 commit fa881a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Clastic/MenuBundle/Twig/MenuExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Clastic\MenuBundle\Entity\MenuItem;
use Clastic\MenuBundle\Entity\MenuItemRepository;
use Doctrine\ORM\Query\Expr\Join;
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;

/**
Expand Down Expand Up @@ -58,7 +59,7 @@ public function getFunctions()
public function renderMenu(\Twig_Environment $environment, $menuIdentifier, $depth = 1)
{
$queryBuilder = $this->repo->getNodesHierarchyQueryBuilder(null, false, array(), true)
->join('ClasticMenuBundle:Menu', 'menu', 'menu.id = node.menu')
->join('ClasticMenuBundle:Menu', 'menu', Join::WITH, 'menu.id = node.menu')
->andWhere('menu.identifier = :identifier')
->setParameter('identifier', $menuIdentifier);

Expand Down

0 comments on commit fa881a9

Please sign in to comment.