function tapir_get_table in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_store/includes/tapir.inc \tapir_get_table()
Loads 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()
- uc_ajax_admin_form in uc_ajax_admin/
uc_ajax_admin.module - Administration form for uc_ajax.
- uc_cart_view_form in uc_cart/
uc_cart.module - Displays the contents of the customer's cart.
- uc_order_edit_products_form in uc_order/
uc_order.order_pane.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_callback in uc_order/
uc_order.api.php - Builds and processes an order pane defined by hook_uc_order_pane().
File
- uc_store/
includes/ tapir.inc, line 20 - 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;
}