public function ViewsBulkOperationsEventSubscriber::provideViewData in Views Bulk Operations (VBO) 8.3
Same name and namespace in other branches
- 8 src/EventSubscriber/ViewsBulkOperationsEventSubscriber.php \Drupal\views_bulk_operations\EventSubscriber\ViewsBulkOperationsEventSubscriber::provideViewData()
- 8.2 src/EventSubscriber/ViewsBulkOperationsEventSubscriber.php \Drupal\views_bulk_operations\EventSubscriber\ViewsBulkOperationsEventSubscriber::provideViewData()
- 4.0.x src/EventSubscriber/ViewsBulkOperationsEventSubscriber.php \Drupal\views_bulk_operations\EventSubscriber\ViewsBulkOperationsEventSubscriber::provideViewData()
Respond to view data request event.
The event to respond to.
File
- src/
EventSubscriber/ ViewsBulkOperationsEventSubscriber.php, line 51
Class
- ViewsBulkOperationsEventSubscriber
- Defines module event subscriber class.
Namespace
Drupal\views_bulk_operations\EventSubscriberCode
public function provideViewData(ViewsBulkOperationsEvent $event) {
$view_data = $event
->getViewData();
if (!empty($view_data['table']['entity type'])) {
$event
->setEntityTypeIds([
$view_data['table']['entity type'],
]);
$event
->setEntityGetter([
'callable' => [
$this->viewData,
'getEntityDefault',
],
]);
}
}