You are here

function theme_views_bulk_operations_confirmation in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 5 views_bulk_operations.module \theme_views_bulk_operations_confirmation()
  2. 6 views_bulk_operations.module \theme_views_bulk_operations_confirmation()
  3. 7.3 views_bulk_operations.module \theme_views_bulk_operations_confirmation()

Theme function to show the confirmation page before executing the action.

1 theme call to theme_views_bulk_operations_confirmation()
views_bulk_operations_form in ./views_bulk_operations.module
Define multistep form for selecting and executing an operation.

File

./views_bulk_operations.module, line 928
Allows operations to be performed on items selected in a view.

Code

function theme_views_bulk_operations_confirmation($objects, $view) {
  $object_info = _views_bulk_operations_object_info_for_view($view);
  $items = array();
  foreach ($objects as $num => $row) {
    $oid = $row->{$view->base_field};
    if (isset($view->pager_original) && count($items) >= $view->pager_original
      ->get_items_per_page()) {
      $items[] = t('...and <strong>!count</strong> more.', array(
        '!count' => count($objects) - count($items),
      ));
      break;
    }
    if ($object = call_user_func($object_info['load'], $oid)) {
      $items[] = check_plain((string) $object->{$object_info['title']});
    }
  }
  $output = theme('item_list', $items, t('You selected the following <strong>!count</strong> rows:', array(
    '!count' => count($objects),
  )));
  return $output;
}