You are here

public function ExampleViewsEventSubscribers::querySubstitutions in Hook Event Dispatcher 8

Query substitutions event handler.

Parameters

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

File

src/Example/ExampleViewsEventSubscribers.php, line 76

Class

ExampleViewsEventSubscribers
Class ExampleViewsEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

public function querySubstitutions(ViewsQuerySubstitutionsEvent $event) {
  $event
    ->setSubstitutions([
    '***CURRENT_TIME***' => \Drupal::time()
      ->getRequestTime(),
  ]);
}