5 * Passes selected ids as arguments to a page.
6 * The ids might be entity ids or revision ids, depending on the type of the
11 * Implementation of hook_action_info().
13 function views_bulk_operations_argument_selector_action_info() {
15 'views_bulk_operations_argument_selector_action' => array(
16 'label' => t('Pass ids as arguments to a page'),
19 'configurable' => FALSE,
21 'triggers' => array('any'),
27 * Implementation of a Drupal action.
28 * Passes selected ids as arguments to a view.
30 function views_bulk_operations_argument_selector_action($entities, $context = array()) {
31 $base_url = $context['settings']['url'];
32 $arguments = implode(',', array_keys($entities));
33 // Add a trailing slash if missing.
34 if (substr($base_url, -1, 1) != '/') {
37 drupal_goto($base_url . $arguments);
40 function views_bulk_operations_argument_selector_action_views_bulk_operations_form($options) {
43 '#type' => 'textfield',
44 '#description' => t('Enter a URL that the user will be sent to. A comma-separated list of selected ids will be appended.'),
45 '#default_value' => isset($options['url']) ? $options['url'] : '',
46 '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),