You are here

function views_bulk_operations_argument_selector_action in Views Bulk Operations (VBO) 7.3

Same name and namespace in other branches
  1. 6.3 argument_selector.action.inc \views_bulk_operations_argument_selector_action()
  2. 6 actions/argument_selector.action.inc \views_bulk_operations_argument_selector_action()

Implementation of a Drupal action. Passes selected ids as arguments to a view.

File

actions/argument_selector.action.inc, line 30
Passes selected ids as arguments to a page. The ids might be entity ids or revision ids, depending on the type of the VBO field.

Code

function views_bulk_operations_argument_selector_action($entities, $context = array()) {
  $base_url = $context['settings']['url'];
  $arguments = implode(',', array_keys($entities));

  // Add a trailing slash if missing.
  if (substr($base_url, -1, 1) != '/') {
    $base_url .= '/';
  }
  drupal_goto($base_url . $arguments);
}