public function ExampleViewsEventSubscribers::preExecute in Hook Event Dispatcher 8
Pre execute event handler.
Parameters
\Drupal\hook_event_dispatcher\Event\Views\ViewsPreExecuteEvent $event: The event.
File
- src/
Example/ ExampleViewsEventSubscribers.php, line 101
Class
- ExampleViewsEventSubscribers
- Class ExampleViewsEventSubscribers.
Namespace
Drupal\hook_event_dispatcher\ExampleCode
public function preExecute(ViewsPreExecuteEvent $event) {
$view = $event
->getView();
// Do something with the view.
$view
->setArguments([
'test',
]);
}