private function createBaseRouteToc($route)
    {
        $toc = [];
        $len = strlen($route);

        foreach ($this->index as $key => $value) {
            if (substr($key, 0, $len + 1) === "$route/") {
                if ($value["internal"] === false
                    && $value["tocable"] === true) {
                    $toc[$key] = $value;
                    
                    $frontm = $this->getFrontmatter($value["file"]);
                    $toc[$key]["title"] = $frontm["title"];
                    $toc[$key]["publishTime"] = $this->getPublishTime($frontm);
                    $toc[$key]["sectionHeader"] = isset($frontm["sectionHeader"])
                        ? $frontm["sectionHeader"]
                        : null;
                    $toc[$key]["linkable"] = isset($frontm["linkable"])
                        ? $frontm["linkable"]
                        : null;
                }
            }
        };

        return $toc;
    }
private function createBaseRouteToc($route)
    {
        $toc = [];
        $len = strlen($route);

        foreach ($this->index as $key => $value) {
            if (substr($key, 0, $len + 1) === "$route/") {
                if ($value["internal"] === false
                    && $value["tocable"] === true) {
                    $toc[$key] = $value;
                    
                    $frontm = $this->getFrontmatter($value["file"]);
                    $toc[$key]["title"] = $frontm["title"];
                    $toc[$key]["publishTime"] = $this->getPublishTime($frontm);
                    $toc[$key]["sectionHeader"] = isset($frontm["sectionHeader"])
                        ? $frontm["sectionHeader"]
                        : null;
                    $toc[$key]["linkable"] = isset($frontm["linkable"])
                        ? $frontm["linkable"]
                        : null;
                }
            }
        };

        return $toc;
    }
private function createBaseRouteToc ( $ route ) { $ toc = [ ] ; $ len = strlen ( $ route ) ; foreach ( $ this -> index as $ key => $ value ) { if ( substr ( $ key , 0 , $ len + 1 ) === "$route/" ) { if ( $ value [ "internal" ] === false && $ value [ "tocable" ] === true ) { $ toc [ $ key ] = $ value ; $ frontm = $ this -> getFrontmatter ( $ value [ "file" ] ) ; $ toc [ $ key ] [ "title" ] = $ frontm [ "title" ] ; $ toc [ $ key ] [ "publishTime" ] = $ this -> getPublishTime ( $ frontm ) ; $ toc [ $ key ] [ "sectionHeader" ] = isset ( $ frontm [ "sectionHeader" ] ) ? $ frontm [ "sectionHeader" ] : null ; $ toc [ $ key ] [ "linkable" ] = isset ( $ frontm [ "linkable" ] ) ? $ frontm [ "linkable" ] : null ; } } } ; return $ toc ; }
Create a table of content for routes at particular level.

@param string $route base route to use.

@return array as the toc.
Create a table of content for routes at particular level .