class ViewsBulkOperationsEvent in Views Bulk Operations (VBO) 8.2
Same name and namespace in other branches
- 8.3 src/ViewsBulkOperationsEvent.php \Drupal\views_bulk_operations\ViewsBulkOperationsEvent
- 8 src/ViewsBulkOperationsEvent.php \Drupal\views_bulk_operations\ViewsBulkOperationsEvent
- 4.0.x src/ViewsBulkOperationsEvent.php \Drupal\views_bulk_operations\ViewsBulkOperationsEvent
Defines Views Bulk Operations event type.
Hierarchy
- class \Drupal\views_bulk_operations\ViewsBulkOperationsEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ViewsBulkOperationsEvent
2 files declare their use of ViewsBulkOperationsEvent
- ViewsBulkOperationsEventSubscriber.php in src/
EventSubscriber/ ViewsBulkOperationsEventSubscriber.php - ViewsBulkOperationsViewData.php in src/
Service/ ViewsBulkOperationsViewData.php
File
- src/
ViewsBulkOperationsEvent.php, line 11
Namespace
Drupal\views_bulk_operationsView source
class ViewsBulkOperationsEvent extends Event {
const NAME = 'views_bulk_operations.view_data';
/**
* The provider of the current view.
*
* @var string
*/
protected $provider;
/**
* The views data of the current view.
*
* @var array
*/
protected $viewData;
/**
* The current view object.
*
* @var \Drupal\views\ViewExecutable
*/
protected $view;
/**
* IDs of entity types returned by the view.
*
* @var array
*/
protected $entityTypeIds;
/**
* Row entity getter information.
*
* @var array
*/
protected $entityGetter;
/**
* Object constructor.
*
* @param string $provider
* The provider of the current view.
* @param array $viewData
* The views data of the current view.
* @param \Drupal\views\ViewExecutable $view
* The current view.
*/
public function __construct($provider, array $viewData, ViewExecutable $view) {
$this->provider = $provider;
$this->viewData = $viewData;
$this->view = $view;
}
/**
* Get view provider.
*
* @return string
* The view provider
*/
public function getProvider() {
return $this->provider;
}
/**
* Get view data.
*
* @return string
* The current view data
*/
public function getViewData() {
return $this->viewData;
}
/**
* Get current view.
*
* @return \Drupal\views\ViewExecutable
* The current view object
*/
public function getView() {
return $this->view;
}
/**
* Get entity type IDs displayed by the current view.
*
* @return array
* Entity type IDs.
*/
public function getEntityTypeIds() {
return $this->entityTypeIds;
}
/**
* Get entity getter callable.
*
* @return array
* Entity getter information.
*/
public function getEntityGetter() {
return $this->entityGetter;
}
/**
* Set entity type IDs.
*
* @param array $entityTypeIds
* Entity type IDs.
*/
public function setEntityTypeIds(array $entityTypeIds) {
$this->entityTypeIds = $entityTypeIds;
}
/**
* Set entity getter callable.
*
* @param array $entityGetter
* Entity getter information.
*/
public function setEntityGetter(array $entityGetter) {
if (!isset($entityGetter['callable'])) {
throw new \Exception('Views Bulk Operations entity getter callable is not defined.');
}
$this->entityGetter = $entityGetter;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ViewsBulkOperationsEvent:: |
protected | property | Row entity getter information. | |
ViewsBulkOperationsEvent:: |
protected | property | IDs of entity types returned by the view. | |
ViewsBulkOperationsEvent:: |
protected | property | The provider of the current view. | |
ViewsBulkOperationsEvent:: |
protected | property | The current view object. | |
ViewsBulkOperationsEvent:: |
protected | property | The views data of the current view. | |
ViewsBulkOperationsEvent:: |
public | function | Get entity getter callable. | |
ViewsBulkOperationsEvent:: |
public | function | Get entity type IDs displayed by the current view. | |
ViewsBulkOperationsEvent:: |
public | function | Get view provider. | |
ViewsBulkOperationsEvent:: |
public | function | Get current view. | |
ViewsBulkOperationsEvent:: |
public | function | Get view data. | |
ViewsBulkOperationsEvent:: |
constant | |||
ViewsBulkOperationsEvent:: |
public | function | Set entity getter callable. | |
ViewsBulkOperationsEvent:: |
public | function | Set entity type IDs. | |
ViewsBulkOperationsEvent:: |
public | function | Object constructor. |