diff --git a/modules/doc/library/Doc/DocTocHtmlRenderer.php b/modules/doc/library/Doc/DocTocHtmlRenderer.php
new file mode 100644
index 000000000..e402f3eb4
--- /dev/null
+++ b/modules/doc/library/Doc/DocTocHtmlRenderer.php
@@ -0,0 +1,45 @@
+html[] = '
';
+ }
+
+ public function endIteration()
+ {
+ $this->html[] = '
';
+ }
+
+ public function beginChildren()
+ {
+ $this->html[] = '';
+ }
+
+ public function endChildren()
+ {
+ $this->html[] = '
';
+ }
+
+ public function render($callback)
+ {
+ foreach ($this as $node) {
+ $this->html[] = $callback($node->getValue());
+ }
+ return implode("\n", $this->html);
+ }
+}