You are here

public function ViewsBulkOperationsController::execute in Views Bulk Operations (VBO) 8.3

Same name and namespace in other branches
  1. 8 src/Controller/ViewsBulkOperationsController.php \Drupal\views_bulk_operations\Controller\ViewsBulkOperationsController::execute()
  2. 8.2 src/Controller/ViewsBulkOperationsController.php \Drupal\views_bulk_operations\Controller\ViewsBulkOperationsController::execute()
  3. 4.0.x src/Controller/ViewsBulkOperationsController.php \Drupal\views_bulk_operations\Controller\ViewsBulkOperationsController::execute()

The actual page callback.

Parameters

string $view_id: The current view ID.

string $display_id: The display ID of the current view.

1 string reference to 'ViewsBulkOperationsController::execute'
views_bulk_operations.routing.yml in ./views_bulk_operations.routing.yml
views_bulk_operations.routing.yml

File

src/Controller/ViewsBulkOperationsController.php, line 84

Class

ViewsBulkOperationsController
Defines VBO controller class.

Namespace

Drupal\views_bulk_operations\Controller

Code

public function execute($view_id, $display_id) {
  $view_data = $this
    ->getTempstoreData($view_id, $display_id);
  if (empty($view_data)) {
    throw new NotFoundHttpException();
  }
  $this
    ->deleteTempstoreData();
  $this->actionProcessor
    ->executeProcessing($view_data);
  if ($view_data['batch']) {
    return batch_process($view_data['redirect_url']);
  }
  else {
    return new RedirectResponse($view_data['redirect_url']
      ->setAbsolute()
      ->toString());
  }
}