You are here

function views_bulk_operations_forms in Views Bulk Operations (VBO) 5

Same name and namespace in other branches
  1. 6.3 views_bulk_operations.module \views_bulk_operations_forms()
  2. 6 views_bulk_operations.module \views_bulk_operations_forms()

hook_forms() implementation force each instance of function to use the same callback

File

./views_bulk_operations.module, line 1011
Allow bulk node operations directly within views.

Code

function views_bulk_operations_forms() {

  // Get the form ID.
  $args = func_get_args();
  $form_id = $args[0][0];

  // Ensure we map a callback for our form and not something else.
  $forms = array();
  if (strpos($form_id, 'views_bulk_operations_form') === 0) {

    // Let the forms API know where to get the form data corresponding
    // to this form id.
    $forms[$form_id] = array(
      'callback' => 'views_bulk_operations_form',
    );
  }
  return $forms;
}