public function ExampleViewsEventSubscribers::preView in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x examples/ExampleViewsEventSubscribers.php \Drupal\hook_event_dispatcher\ExampleViewsEventSubscribers::preView()
Pre view event handler.
Parameters
\Drupal\views_event_dispatcher\Event\Views\ViewsPreViewEvent $event: The event.
File
- examples/
ExampleViewsEventSubscribers.php, line 36
Class
- ExampleViewsEventSubscribers
- Class ExampleViewsEventSubscribers.
Namespace
Drupal\hook_event_dispatcherCode
public function preView(ViewsPreViewEvent $event) : void {
$args =& $event
->getArgs();
// Do something with the arguments.
$args[0] = 'custom value';
}