You are here

public function ExampleViewsEventSubscribers::preView in Hook Event Dispatcher 8

Pre view event handler.

Parameters

\Drupal\hook_event_dispatcher\Event\Views\ViewsPreViewEvent $event: The event.

File

src/Example/ExampleViewsEventSubscribers.php, line 37

Class

ExampleViewsEventSubscribers
Class ExampleViewsEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

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

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