protected function ViewsBulkOperationsViewData::getData in Views Bulk Operations (VBO) 8.3
Same name and namespace in other branches
- 8 src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::getData()
- 8.2 src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::getData()
- 4.0.x src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::getData()
Helper function to get data of the current view.
Return value
array Part of views data that refers to the current view.
3 calls to ViewsBulkOperationsViewData::getData()
- ViewsBulkOperationsViewData::getViewBaseField in src/
Service/ ViewsBulkOperationsViewData.php - Get base field for the current view.
- ViewsBulkOperationsViewData::getViewProvider in src/
Service/ ViewsBulkOperationsViewData.php - Get view provider.
- ViewsBulkOperationsViewData::init in src/
Service/ ViewsBulkOperationsViewData.php - Initialize additional variables.
File
- src/
Service/ ViewsBulkOperationsViewData.php, line 112
Class
- ViewsBulkOperationsViewData
- Gets Views data needed by VBO.
Namespace
Drupal\views_bulk_operations\ServiceCode
protected function getData() {
if (!$this->data) {
$viewsData = Views::viewsData();
if (!empty($this->relationship) && $this->relationship != 'none') {
$relationship = $this->displayHandler
->getOption('relationships')[$this->relationship];
$table_data = $viewsData
->get($relationship['table']);
$this->data = $viewsData
->get($table_data[$relationship['field']]['relationship']['base']);
}
else {
$this->data = $viewsData
->get($this->view->storage
->get('base_table'));
}
}
return $this->data;
}