public function ViewsBulkOperationsViewData::init 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::init()
- 8.2 src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::init()
- 4.0.x src/Service/ViewsBulkOperationsViewData.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsViewData::init()
Initialize additional variables.
Parameters
\Drupal\views\ViewExecutable $view: The view object.
\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The current display plugin.
string $relationship: Relationship ID.
Overrides ViewsBulkOperationsViewDataInterface::init
File
- src/
Service/ ViewsBulkOperationsViewData.php, line 87
Class
- ViewsBulkOperationsViewData
- Gets Views data needed by VBO.
Namespace
Drupal\views_bulk_operations\ServiceCode
public function init(ViewExecutable $view, DisplayPluginBase $display, $relationship) {
$this->view = $view;
$this->displayHandler = $display;
$this->relationship = $relationship;
// Get view entity types and results fetcher callable.
$event = new ViewsBulkOperationsEvent($this
->getViewProvider(), $this
->getData(), $view);
$this->eventDispatcher
->dispatch(ViewsBulkOperationsEvent::NAME, $event);
$this->entityTypeIds = $event
->getEntityTypeIds();
$this->entityGetter = $event
->getEntityGetter();
}