public function getTableOfContent($id)
    {
        if ($this->toc) {
            return $this->toc;
        }

        $key = $this->di->cache->createKey(__CLASS__, 'toc-' . $id);
        $this->toc = $this->di->cache->get($key);

        if (!$this->toc) {
            $this->toc = $this->createTableOfContent();
            $this->di->cache->put($key, $this->toc);
        }

        return $this->toc;
    }
public function getTableOfContent($id)
    {
        if ($this->toc) {
            return $this->toc;
        }

        $key = $this->di->cache->createKey(__CLASS__, 'toc-' . $id);
        $this->toc = $this->di->cache->get($key);

        if (!$this->toc) {
            $this->toc = $this->createTableOfContent();
            $this->di->cache->put($key, $this->toc);
        }

        return $this->toc;
    }
public function getTableOfContent ( $ id ) { if ( $ this -> toc ) { return $ this -> toc ; } $ key = $ this -> di -> cache -> createKey ( __CLASS__ , 'toc-' . $ id ) ; $ this -> toc = $ this -> di -> cache -> get ( $ key ) ; if ( ! $ this -> toc ) { $ this -> toc = $ this -> createTableOfContent ( ) ; $ this -> di -> cache -> put ( $ key , $ this -> toc ) ; } return $ this -> toc ; }
Get table of content for all pages.

@param string $id to use to generate key for toc.

@return array as table of content.
Get table of content for all pages .