public __construct ( Knp\Menu\FactoryInterface $factory, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker, Symfony\Component\HttpFoundation\RequestStack $requestStack, Symfony\Component\Routing\RouterInterface $router, Networking\InitCmsBundle\Model\MenuItemManagerInterface $menuManager, Symfony\Component\Translation\TranslatorInterface $translator, Knp\Menu\Matcher\Matcher $matcher ) | ||
$factory | Knp\Menu\FactoryInterface | |
$tokenStorage | Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | |
$authorizationChecker | Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface | |
$requestStack | Symfony\Component\HttpFoundation\RequestStack | |
$router | Symfony\Component\Routing\RouterInterface | |
$menuManager | Networking\InitCmsBundle\Model\MenuItemManagerInterface | |
$translator | Symfony\Component\Translation\TranslatorInterface | |
$matcher | Knp\Menu\Matcher\Matcher |
public function __construct(FactoryInterface $factory, TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorizationChecker, RequestStack $requestStack, RouterInterface $router, MenuItemManagerInterface $menuManager, TranslatorInterface $translator, Matcher $matcher)
{
$this->factory = $factory;
$this->tokenStorage = $tokenStorage;
$this->authorizationChecker = $authorizationChecker;
$this->router = $router;
$this->request = $requestStack->getCurrentRequest();
$this->menuManager = $menuManager;
$this->translator = $translator;
$this->matcher = $matcher;
$this->setLoggedIn();
$this->setViewStatus();
$this->setCurrentPath();
$this->setCurrentUri();
$this->addVoter($this->request->getBaseUrl() . $this->request->getPathInfo());
$this->addVoter($this->currentUri);
}