Generating Table Lists

Another function available to developers is tapir_table_list. This function is used to generate a list of defined tables that link to their edit forms. When no arguments are passed, this function generates a table showing the IDs of every table defined by TAPIr in the enabled modules and their descriptions. Clicking on an ID will take the user to that table's settings page. This is how the table is generated at admin/settings/tapir.

As stated above, the default path for a table's settings page is admin/settings/tapir/table_id where table_id is the ID of the table as defined by TAPIr. Since the path may be specified as any_path/table_id in TAPIr hook_table_settings(), it may be necessary to generate a list of tables whose path (not including the table_id) only matches a certain set of paths. To accomplish that, you may pass a path or list of paths in as optional arguments.

For example, if hook_table_settings() defines the path of a few tables as module/tables, you can generate a list of these tables by calling this function with the following line:

= tapir_table_list('module/tables');