protected static function activeNodes(Request $request, array $nodes = [], $level = 0) {

        $result = false;

        foreach ($nodes as $n) {

            if (false === ($n instanceof AbstractNavigationNode)) {
                continue;
            }

            if (true === self::nodeMatch($n, $request)) {
                $current = true;
            } else {
                $current = self::activeNodes($request, $n->getNodes(), $level + 1);
            }

            if (false === $current) {
                continue;
            }

            $n->setActive(true);

            $result = true;
        }

        return $result;
    }