Example 2: Define a Settings Page

Settings pages are defined in a module's TAPIr hook_table_settings. You can view the keys available for the table settings array in the handbook. This example defines an alternate path for the settings page and sets its access to 'access content' instead of the default 'edit tables' defined by TAPIr. Feel free to browse there, change the settings, and see your handiwork!

Example: view page (no backlink on settings page; opens in a new window)

Code:

<?php
function tapirtest_table_settings() {
 
$tables[] = array(
   
'id' => 'tapirtest_example_table_1',
   
'description' => t('An example settings page for the previous table.'),
   
'path' => 'tapirtest/example_2',
   
'access' => 'access content',
  );
  return
$tables;
}
?>