You are here

public function ExampleViewsEventSubscribers::preView in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 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_dispatcher

Code

public function preView(ViewsPreViewEvent $event) : void {
  $args =& $event
    ->getArgs();

  // Do something with the arguments.
  $args[0] = 'custom value';
}