svn: /phd/trunk/phpdotnet/phd/Package/Generic/ XHTML.php
| From: | Paul Jones | Date: | Mon, 03 May 2010 19:28:19 +0000 |
| Subject: | svn: /phd/trunk/phpdotnet/phd/Package/Generic/ XHTML.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6566@lists.php.net to get a copy of this message | ||
pmjones Mon, 03 May 2010 19:28:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298926
Log:
Package_Generic_XHTML: [REF] Refactor method creteTOC() to extract new method, getTocHeader(). This
makes it easier for extended classes to override how the Table of Contents header is presented
without having to copy-and-paste the entire createTOC() method.
Changed paths:
U phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php
Modified: phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php
===================================================================
--- phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php 2010-05-03 19:09:45 UTC (rev 298925)
+++ phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php 2010-05-03 19:28:19 UTC (rev 298926)
@@ -473,7 +473,7 @@
}
$toc = '';
if ($header) {
- $toc .= '<strong>' . $this->autogen('toc',
$props['lang']) . '</strong>';
+ $toc .= $this->getTocHeader($props);
}
$toc .= "<ul class=\"chunklist chunklist_$name\">\n";
foreach ($this->getChildren($id) as $child) {
@@ -497,6 +497,11 @@
return $toc;
}
+ protected function getTocHeader($props)
+ {
+ return '<strong>' . $this->autogen('toc',
$props['lang']) . '</strong>';
+ }
+
/**
* Handle a <phd:toc> tag.
*/