function tapir_get_table in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_store/includes/tapir.inc \tapir_get_table()
Load a table element for use in the Forms API or simply drupal_render().
Parameters
$table_id: The string identifying the table you want to display, like a form ID.
...: Any additional arguments will be passed on to the table builder function specified as the $table_id.
Return value
The table form element.
8 calls to tapir_get_table()
- theme_uc_catalog_products in uc_catalog/
uc_catalog.module - Displays a formatted list of products.
- uc_cart_view_form in uc_cart/
uc_cart.module - Displays a page allowing the customer to view the contents of his or her cart.
- uc_order_edit_products_form in uc_order/
uc_order.admin.inc - Form to allow ordered products' data to be changed.
- uc_order_pane_admin_comments in uc_order/
uc_order.order_pane.inc - Handles the "Admin Comments" order pane.
- uc_order_pane_order_comments in uc_order/
uc_order.order_pane.inc - Handles the "Order Comments" order pane.
File
- uc_store/
includes/ tapir.inc, line 19 - Contains the TAPIr code rolled into Ubercart core from Drupal contrib.
Code
function tapir_get_table($table_id) {
// Get any additional arguments.
$args = func_get_args();
array_shift($args);
// Retrieve the table data and allow modules to alter it.
$table = call_user_func_array($table_id, $args);
array_unshift($args, $table_id);
$data =& $table;
// Pass the arguments in the table so that alter functions can use them.
$data['#parameters'] = $args;
drupal_alter('tapir_table', $data, $table_id);
return $table;
}