private function buildTreeFromArray(
        array $treeStructure,
        \Tx_Oelib_Visibility_Node $parentNode
    ) {
        foreach ($treeStructure as $nodeKey => $nodeContents) {
            /** @var \Tx_Oelib_Visibility_Node $childNode */
            $childNode = GeneralUtility::makeInstance(\Tx_Oelib_Visibility_Node::class);
            $parentNode->addChild($childNode);

            if (is_array($nodeContents)) {
                $this->buildTreeFromArray($nodeContents, $childNode);
            } elseif ($nodeContents === true) {
                $childNode->markAsVisible();
            }

            $this->nodes[$nodeKey] = $childNode;
        }
    }