You are here

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

Same name and namespace in other branches
  1. 8.3 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 64

Class

ViewsBulkOperationsController
Defines VBO controller class.

Namespace

Drupal\views_bulk_operations\Controller

Code

public function execute($view_id, $display_id) {
  $tempstore_name = 'views_bulk_operations_' . $view_id . '_' . $display_id;
  $tempstore = $this->tempStoreFactory
    ->get($tempstore_name);
  $view_data = $tempstore
    ->get($this
    ->currentUser()
    ->id());
  $tempstore
    ->delete($this
    ->currentUser()
    ->id());
  $this->actionProcessor
    ->executeProcessing($view_data);
  return batch_process($view_data['redirect_url']);
}