TAPIr defines the following hooks for use in your modules:
- hook_table_settings() - Defines the tables you want to appear in table lists and for which the module will auto-generate settings forms for table configuration.
- hook_table_alter($table_id, $op, $args) - Add fields to the table $table_id, using the same $op as the builder function ('fields' to define the fields and 'data' to return the data for those fields). Holy crap! $args is probably an array of nids that can be used to get data about each cell in the table (node_load($nid) for example). This argument was not previously documented here and it took me hours to figure out that it existed. Using it on ubercart's uc_product_table resulted in an array of nids, so I assume it's probably the same most pretty much everything else. If anyone knows any different, update this description with more info. This means tables are extensible and can be modified by other modules just like forms. Please see the Extensible Tables section below to read more about this incredible feature.