function _tableofcontents_block_form in Table of Contents 7
Same name and namespace in other branches
- 6.3 tableofcontents_block/tableofcontents_block.module \_tableofcontents_block_form()
Create a form to setup the Table of contents block.
1 call to _tableofcontents_block_form()
- tableofcontents_block_block_configure in tableofcontents_block/
tableofcontents_block.module - Implements hook_block_configure().
File
- tableofcontents_block/
tableofcontents_block.module, line 50 - main file for module providing a block
Code
function _tableofcontents_block_form() {
// we get the filter form
module_load_include('admin.inc', 'tableofcontents');
$filter_form = _tableofcontents_settings('block');
// then we change a few things
$form = $filter_form['tableofcontents'];
// adapt some messages
$form['tableofcontents_min_limit_block']['#title'] = t('Number of headers to show table of contents');
$form['tableofcontents_min_limit_block']['#description'] = t('The minimum number of headers before the table of contents is shown.');
// forced values are never shown to the user
unset($form['tableofcontents_automatic_block']);
// there is no top or bottom! so we always use top
unset($form['tableofcontents_hide_table_block']);
unset($form['tableofcontents_allow_override_block']);
unset($form['tableofcontents_back_to_top_block']);
unset($form['tableofcontents_back_to_top_location_block']);
unset($form['tableofcontents_back_to_top_anchor_block']);
unset($form['tableofcontents_scroll_back_to_top_block']);
unset($form['tableofcontents_number_headers_block']);
unset($form['tableofcontents_remove_teaser_block']);
return $form;
}