You are here

public function ExampleViewsEventSubscribers::preBuild in Hook Event Dispatcher 8

Pre build event handler.

Parameters

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

File

src/Example/ExampleViewsEventSubscribers.php, line 50

Class

ExampleViewsEventSubscribers
Class ExampleViewsEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

public function preBuild(ViewsPreBuildEvent $event) {
  $view = $event
    ->getView();

  // Do something with the view.
  $view
    ->setArguments([
    'test',
  ]);
}