You are here

public function ViewsBulkOperationsViewData::getViewBaseField in Views Bulk Operations (VBO) 8.3

Same name and namespace in other branches
  1. 8.2 src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::getViewBaseField()
  2. 4.0.x src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::getViewBaseField()

Get base field for the current view.

Return value

sting The base field name.

Overrides ViewsBulkOperationsViewDataInterface::getViewBaseField

File

src/Service/ViewsBulkOperationsViewData.php, line 141

Class

ViewsBulkOperationsViewData
Gets Views data needed by VBO.

Namespace

Drupal\views_bulk_operations\Service

Code

public function getViewBaseField() {
  $views_data = $this
    ->getData();
  if (isset($views_data['table']['base']['field'])) {
    return $views_data['table']['base']['field'];
  }
  throw new \Exception('Unable to get base field for the view.');
}