function tableofcontents_toc in Table of Contents 7.2
Returns a static TOC variable for fast loading
5 calls to tableofcontents_toc()
- tableofcontents_field_attach_view_alter in ./
tableofcontents.module - Implementation of hook_field_attach_view_alter(&$output, $context)
- _tableofcontents_apply_toc in ./
tableofcontents.module - _tableofcontents_headers in ./
tableofcontents.inc - This function goes through all the headers found in the text.
- _tableofcontents_process_text in ./
tableofcontents.module - Developer function to apply TOC to any text $body has two assumptions for this function to work 1. It must have [toc] located somewhere in the text 2. It has already been processed by an input filter with toc enabled
- _tableofcontents_replace_headers in ./
tableofcontents.inc - This function changes a header attributes. It adds an identifier in case there are none. It registers the identifier if there is already one.
File
- ./
tableofcontents.module, line 279 - This is a filter module to generate a collapsible jquery enabled mediawiki style table of contents based on <h[1-6]> tags. Transforms header tags into named anchors.
Code
function &tableofcontents_toc($toc = NULL) {
static $drupal_static_fast;
if (!isset($drupal_static_fast)) {
$drupal_static_fast[__FUNCTION__] =& drupal_static(__FUNCTION__);
}
if (is_array($toc)) {
$drupal_static_fast[__FUNCTION__] = $toc;
}
return $drupal_static_fast[__FUNCTION__];
}