cvs: phd /themes/pear peartheme.php

From: Date: Fri, 31 Oct 2008 16:00:10 +0000
Subject: cvs: phd /themes/pear peartheme.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2352@lists.php.net to get a copy of this message
cweiske Fri Oct 31 16:00:10 2008 UTC Modified files: /phd/themes/pear peartheme.php Log: Add support for <phd:toc> tags for pear. I'll move this to xhtml format soon, but am putting that in here so people can play around. Example: <phd:toc phd:element="package.html.html-quickform.elements" phd:toc-depth="2"> <title>Test-TOC for package.html.html-quickform.elements</title> </phd:toc> http://cvs.php.net/viewvc.cgi/phd/themes/pear/peartheme.php?r1=1.13&r2=1.14&diff_format=u Index: phd/themes/pear/peartheme.php diff -u phd/themes/pear/peartheme.php:1.13 phd/themes/pear/peartheme.php:1.14 --- phd/themes/pear/peartheme.php:1.13 Thu Oct 30 18:20:51 2008 +++ phd/themes/pear/peartheme.php Fri Oct 31 16:00:10 2008 @@ -103,6 +103,7 @@ 'replaceable' => 'format_replaceable', 'refentry' => 'format_chunk', 'reference' => 'format_container_chunk', + 'phd:toc' => 'format_phd_toc', 'phpdoc:exception' => 'format_exception_chunk', 'refname' => 'h1', 'refnamediv' => 'format_suppressed_tags', @@ -135,6 +136,7 @@ 'chapter' => 'format_container_chunk_title', //'example' => 'format_example_title', 'part' => 'format_container_chunk_title', + 'phd:toc' => 'strong', 'preface' => 'format_container_chunk_title', 'info' => array( /* DEFAULT */ false, @@ -451,6 +453,20 @@ return $this->format_table($open, $name, $attrs, $props) . '<p>'; } + public function format_phd_toc($open, $name, $attrs, $props) { + if ($open) { + return '<div class="phd-toc">'; + } + return $this->createToc( + $attrs[PhDReader::XMLNS_PHD]['element'], + 'phd-toc', + $props, + isset($attrs[PhDReader::XMLNS_PHD]['toc-depth']) + ? (int)$attrs[PhDReader::XMLNS_PHD]['toc-depth'] : 1, + false + ) . "</div>\n"; + } + public function format_programlisting($open, $name, $attrs) { if ($open) { if (isset($attrs[PhDReader::XMLNS_DOCBOOK]["role"])) {

« previous php.doc.cvs (#2352) next »