static string display_toc(
array
&$headlines, [string
$cssclass = ''], [string
$optlink = 'anchor'], boolean
$optinclude
)
|
|
Display Table of Contents
Parameters:
|
array |
&$headlines: |
|
|
string |
$cssclass: |
css class |
|
string |
$optlink: |
link option |
|
boolean |
$optinclude: |
show toc of including pages too or not |
API Tags:
| Return: | list html |
| Access: | public |
Copy members of Toc objects
Parameters:
API Tags:
PluginSonotsToc PluginSonotsToc(
[string
$page = ''], [boolean
$usecache = true]
)
|
|
Constructor
If a page is given, the true constructor self::init() is called. Otherwise, this only initializes static member variables. PHP4 static member variable trick.
Parameters:
|
string |
$page: |
|
|
boolean |
$usecache: |
|
API Tags:
void compact_depth(
array
&$headlines
)
|
|
Compact depth of headlines
Parameters:
API Tags:
void construct_toc(
$page
)
|
|
Read a page and construct Toc (This is THE constructor)
Parameters:
API Tags:
Information Tags:
| Todo: | should be able to separate functionalities more |
array expand_includes(
[array
$visited = array()]
)
|
|
Expand headlines of included pages
$visited is used only inside for recursive call, you do not need to use it.
Parameters:
|
array |
$visited: |
a flag to check whether the page is processed already. |
API Tags:
Get Extra (Direct access is okay, though)
API Tags:
string|null get_firsthead(
)
|
|
Get First Headline String of this page if available
API Tags:
Get line number of #contents line if available
API Tags:
Get Headlines (Direct access is okay, though)
API Tags:
array get_includepages(
)
|
|
Get including pages in this page.
API Tags:
Get Includes (Direct access is okay, though)
API Tags:
Get line number of #readmore line if available
API Tags:
Get TITLE of this page if available
API Tags:
void init(
string
$page, boolean
$usecache
)
|
|
True Constructor
Parameters:
|
string |
$page: |
|
|
boolean |
$usecache: |
|
API Tags:
Reverse expand_includes
API Tags: