final class ViewsQueryAlterEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/views_event_dispatcher/src/Event/Views/ViewsQueryAlterEvent.php \Drupal\views_event_dispatcher\Event\Views\ViewsQueryAlterEvent
Class ViewsQueryAlterEvent.
Hierarchy
- class \Drupal\views_event_dispatcher\Event\Views\AbstractViewsEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
- class \Drupal\views_event_dispatcher\Event\Views\ViewsQueryAlterEvent
Expanded class hierarchy of ViewsQueryAlterEvent
2 files declare their use of ViewsQueryAlterEvent
- ExampleViewsEventSubscribers.php in examples/
ExampleViewsEventSubscribers.php - views_event_dispatcher.module in modules/
views_event_dispatcher/ views_event_dispatcher.module - Views event dispatcher submodule.
File
- modules/
views_event_dispatcher/ src/ Event/ Views/ ViewsQueryAlterEvent.php, line 12
Namespace
Drupal\views_event_dispatcher\Event\ViewsView source
final class ViewsQueryAlterEvent extends AbstractViewsEvent {
/**
* 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() : QueryPluginBase {
return $this->query;
}
/**
* Get the dispatcher type.
*
* @return string
* The dispatcher type.
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::VIEWS_QUERY_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractViewsEvent:: |
private | property | The view. | |
AbstractViewsEvent:: |
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 AbstractViewsEvent:: |