Toctree

Extends \ezcDocumentRstDirective Implements \ezcDocumentRstXhtmlDirective

Directive used to process `.

. toctree::` and insert entries from the table of contents.

This directive tries to match the file with an entry in the table of contents during the creation phase. If a document is found it will generate a mini-table of contents at that location with the depth given using the :maxdepth: parameter.

Another option is :hidden: that will hide the toc from view while still making connections.

This directive is inspired by Sphinx' toctree directive.

package

Default

Methods

__construct

__construct(\ezcDocumentRstDocumentNode $ast,  $path, \ezcDocumentRstDirectiveNode $node) 

Arguments

$ast

\ezcDocumentRstDocumentNode

$path

$node

\ezcDocumentRstDirectiveNode

addLinksToTableOfContents

addLinksToTableOfContents() 

Retrieves the caption for the given $token.

getCaption(\ezcDocumentRstToken $file_name) : string

The caption is retrieved by converting the filename to a human-readable format.

Arguments

$file_name

\ezcDocumentRstToken

Response

string

Transform directive to docbook

toDocbook(\DOMDocument $document, \DOMElement $root) : void

Create a docbook XML structure at the directives position in the document.

Arguments

$document

\DOMDocument

$root

\DOMElement

Transform directive to HTML

toXhtml(\DOMDocument $document, \DOMElement $root) : void

Create a XHTML structure at the directives position in the document.

todo

use the TableofContents collection to extract a sublisting up to the given depth or 2 if none is provided

Arguments

$document

\DOMDocument

$root

\DOMElement

Properties