public function ExampleViewsEventSubscribers::querySubstitutions in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 examples/ExampleViewsEventSubscribers.php \Drupal\hook_event_dispatcher\ExampleViewsEventSubscribers::querySubstitutions()
Query substitutions event handler.
Parameters
\Drupal\views_event_dispatcher\Event\Views\ViewsQuerySubstitutionsEvent $event: The event.
File
- examples/
ExampleViewsEventSubscribers.php, line 75
Class
- ExampleViewsEventSubscribers
- Class ExampleViewsEventSubscribers.
Namespace
Drupal\hook_event_dispatcherCode
public function querySubstitutions(ViewsQuerySubstitutionsEvent $event) : void {
$event
->addSubstitution('***CURRENT_TIME***', \Drupal::time()
->getRequestTime());
}