private function getActiveNodeIds($request)
    {
        if (null === $this->activeNodeIds) {
            if (stripos($request->attributes->get('_route'), 'KunstmaanNodeBundle_nodes_edit') === 0) {
                $repo = $this->em->getRepository('KunstmaanNodeBundle:Node');

                $currentNode = $repo->findOneById($request->attributes->get('id'));
                $parentNodes = $repo->getAllParents($currentNode);
                $this->activeNodeIds = [];
                foreach ($parentNodes as $parentNode) {
                    $this->activeNodeIds[] = $parentNode->getId();
                }
            }
        }

        return is_null($this->activeNodeIds) ? [] : $this->activeNodeIds;
    }