class ViewsPreViewEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/views_event_dispatcher/src/Event/Views/ViewsPreViewEvent.php \Drupal\views_event_dispatcher\Event\Views\ViewsPreViewEvent
Class ViewsPreRenderEvent.
Hierarchy
- class \Drupal\views_event_dispatcher\Event\Views\AbstractViewsEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
- class \Drupal\views_event_dispatcher\Event\Views\ViewsPreViewEvent
Expanded class hierarchy of ViewsPreViewEvent
3 files declare their use of ViewsPreViewEvent
- ExampleViewsEventSubscribers.php in examples/
ExampleViewsEventSubscribers.php - ViewEventTest.php in modules/
views_event_dispatcher/ tests/ src/ Unit/ Views/ ViewEventTest.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/ ViewsPreViewEvent.php, line 11
Namespace
Drupal\views_event_dispatcher\Event\ViewsView source
class ViewsPreViewEvent extends AbstractViewsEvent {
/**
* Array of arguments passed into the view.
*
* @var array
*/
private $arguments;
/**
* The machine name of the active display.
*
* @var string
*/
private $displayId;
/**
* ViewsPreExecuteEevent constructor.
*
* @param \Drupal\views\ViewExecutable $view
* The view object about to be processed.
* @param string $displayId
* The machine name of the active display.
* @param array $arguments
* An array of arguments passed into the view.
*/
public function __construct(ViewExecutable $view, $displayId, array &$arguments) {
parent::__construct($view);
$this->displayId = $displayId;
$this->arguments =& $arguments;
}
/**
* Get the machine name of the active display.
*
* @return string
* The machine name of the active display.
*/
public function getDisplayId() : string {
return $this->displayId;
}
/**
* Get the array of view arguments.
*
* @return array
* The array of arguments passed into the view.
*/
public function &getArguments() : array {
return $this->arguments;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::VIEWS_PRE_VIEW;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractViewsEvent:: |
private | property | The view. | |
AbstractViewsEvent:: |
public | function | Get the view. | |
ViewsPreViewEvent:: |
private | property | Array of arguments passed into the view. | |
ViewsPreViewEvent:: |
private | property | The machine name of the active display. | |
ViewsPreViewEvent:: |
public | function | Get the array of view arguments. | |
ViewsPreViewEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
ViewsPreViewEvent:: |
public | function | Get the machine name of the active display. | |
ViewsPreViewEvent:: |
public | function |
ViewsPreExecuteEevent constructor. Overrides AbstractViewsEvent:: |