final class ViewsQueryAlterEvent in Hook Event Dispatcher 8
Class ViewsQueryAlterEvent.
@package Drupal\hook_event_dispatcher\Event\Views
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Views\BaseViewsEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
- class \Drupal\hook_event_dispatcher\Event\Views\ViewsQueryAlterEvent
Expanded class hierarchy of ViewsQueryAlterEvent
2 files declare their use of ViewsQueryAlterEvent
- ExampleViewsEventSubscribers.php in src/
Example/ ExampleViewsEventSubscribers.php - hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
File
- src/
Event/ Views/ ViewsQueryAlterEvent.php, line 14
Namespace
Drupal\hook_event_dispatcher\Event\ViewsView source
final class ViewsQueryAlterEvent extends BaseViewsEvent {
/**
* The query.
*
* @var \Drupal\views\Plugin\views\query\QueryPluginBase
*/
private $query;
/**
* ViewsPreExecuteEevent constructor.
*
* @param \Drupal\views\ViewExecutable $view
* The view.
* @param \Drupal\views\Plugin\views\query\QueryPluginBase $query
* The query.
*/
public function __construct(ViewExecutable $view, QueryPluginBase $query) {
parent::__construct($view);
$this->query = $query;
}
/**
* Get the query.
*
* @return \Drupal\views\Plugin\views\query\QueryPluginBase
* The query.
*/
public function getQuery() {
return $this->query;
}
/**
* Get the dispatcher type.
*
* @return string
* The dispatcher type.
*/
public function getDispatcherType() {
return HookEventDispatcherInterface::VIEWS_QUERY_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseViewsEvent:: |
private | property | The view. | |
BaseViewsEvent:: |
public | function | Get the view. | |
ViewsQueryAlterEvent:: |
private | property | The query. | |
ViewsQueryAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
ViewsQueryAlterEvent:: |
public | function | Get the query. | |
ViewsQueryAlterEvent:: |
public | function |
ViewsPreExecuteEevent constructor. Overrides BaseViewsEvent:: |