protected function ViewsBulkOperationsKernelTestBase::initializeView in Views Bulk Operations (VBO) 4.0.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/ViewsBulkOperationsKernelTestBase.php \Drupal\Tests\views_bulk_operations\Kernel\ViewsBulkOperationsKernelTestBase::initializeView()
- 8.2 tests/src/Kernel/ViewsBulkOperationsKernelTestBase.php \Drupal\Tests\views_bulk_operations\Kernel\ViewsBulkOperationsKernelTestBase::initializeView()
Initialize and return the view described by $vbo_data.
Parameters
array $vbo_data: An array of data passed to VBO Processor service.
Return value
\Drupal\views\ViewExecutable The view object.
2 calls to ViewsBulkOperationsKernelTestBase::initializeView()
- ViewsBulkOperationsKernelTestBase::executeAction in tests/
src/ Kernel/ ViewsBulkOperationsKernelTestBase.php - Execute an action on a specific view results.
- ViewsBulkOperationsKernelTestBase::getResultsList in tests/
src/ Kernel/ ViewsBulkOperationsKernelTestBase.php - Get a random list of results bulk keys.
File
- tests/
src/ Kernel/ ViewsBulkOperationsKernelTestBase.php, line 179
Class
- ViewsBulkOperationsKernelTestBase
- Base class for Views Bulk Operations kernel tests.
Namespace
Drupal\Tests\views_bulk_operations\KernelCode
protected function initializeView(array $vbo_data) {
if (!($view = Views::getView($vbo_data['view_id']))) {
throw new \Exception('Incorrect view ID provided.');
}
if (!$view
->setDisplay($vbo_data['display_id'])) {
throw new \Exception('Incorrect view display ID provided.');
}
$view->built = FALSE;
$view->executed = FALSE;
return $view;
}