Skip to content

Commit

Permalink
remove nested & update navigation version (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlutter authored and ivanbarlog committed May 10, 2018
1 parent 7e1c8f5 commit 5ca14a7
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 163 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"symfony/templating": "^3.0|^4.0",
"symfony/translation": "^3.0|^4.0",
"symfony/twig-bundle": "^3.0|^4.0",
"everlutionsk/navigation": "^2.2"
"everlutionsk/navigation": "^2.3"
},
"license": "MIT",
"authors": [
Expand Down
41 changes: 0 additions & 41 deletions src/DependencyInjection/Compiler/NestedRegistryCompilerPass.php

This file was deleted.

1 change: 0 additions & 1 deletion src/EverlutionNavigationBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class EverlutionNavigationBundle extends Bundle
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new RegistryCompilerPass());
$container->addCompilerPass(new NestedRegistryCompilerPass());
$container->addCompilerPass(new UrlProviderCompilerPass());
$container->addCompilerPass(new VoterCompilerPass());
$container->addCompilerPass(new RegisterStandaloneItemsCompilerPass());
Expand Down
4 changes: 0 additions & 4 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ services:
Everlution\NavigationBundle\Bridge\Item\RequestAttributesContainer: ~

Everlution\Navigation\Registry: ~
Everlution\Navigation\Nested\Registry: ~
Everlution\Navigation\Url\UrlProviderContainer: ~
Everlution\NavigationBundle\Bridge\NavigationAliasContainer: ~
Everlution\NavigationBundle\Bridge\Matcher: ~
Expand All @@ -21,11 +20,8 @@ services:
# twig extension
Everlution\NavigationBundle\Twig\ItemHelper: ~
Everlution\NavigationBundle\Twig\NavigationHelper: ~
Everlution\NavigationBundle\Twig\NestedNavigationHelper: ~
Everlution\NavigationBundle\Twig\NavigationExtension:
tags: ['twig.extension']
Everlution\NavigationBundle\Twig\NestedNavigationExtension:
tags: ['twig.extension']
Everlution\NavigationBundle\Twig\ItemExtension:
tags: ['twig.extension']

Expand Down
6 changes: 5 additions & 1 deletion src/Twig/NavigationHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ public function isCurrent(string $identifier, ItemInterface $item): bool

public function isAncestor(string $identifier, ItemInterface $item): bool
{
return $this->getNavigation($identifier)->isAncestor($item);
try {
return $this->getNavigation($identifier)->isAncestor($item);
} catch (NoCurrentItemFoundException $e) {
return false;
}
}

public function getNavigation(string $navigation): NavigationBuilder
Expand Down
56 changes: 0 additions & 56 deletions src/Twig/NestedNavigationExtension.php

This file was deleted.

59 changes: 0 additions & 59 deletions src/Twig/NestedNavigationHelper.php

This file was deleted.

0 comments on commit 5ca14a7

Please sign in to comment.