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);
}