private function init()
    {
        if ($this->initialized) {
            return;
        }

        $this->allNodes = array();
        $this->breadCrumb = null;
        $this->childNodes = array();
        $this->topNodeMenuItems = null;
        $this->nodesByInternalName = array();

        /* @var NodeRepository $repo */
        $repo = $this->em->getRepository('KunstmaanNodeBundle:Node');

        // Get all possible menu items in one query (also fetch offline nodes)
        $nodes = $repo->getChildNodes(
            false,
            $this->locale,
            $this->permission,
            $this->aclHelper,
            $this->includeHiddenFromNav,
            true,
            $this->domainConfiguration->getRootNode()
        );
        foreach ($nodes as $node) {
            $this->allNodes[$node->getId()] = $node;

            if ($node->getParent()) {
                $this->childNodes[$node->getParent()->getId()][] = $node;
            } else {
                $this->childNodes[0][] = $node;
            }
            $internalName = $node->getInternalName();
            if ($internalName) {
                $this->nodesByInternalName[$internalName][] = $node;
            }
        }
        $this->initialized = true;
    }