Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ViewsViewsExecutionHooks.php

function ViewsViewsExecutionHooks::viewsQuerySubstitutions

Implements hook_views_query_substitutions().

Makes the following substitutions:

  • Current time.
  • Drupal version.
  • Special language codes; see \Drupal\views\Plugin\views\PluginBase::listLanguages().

File

core/modules/views/src/Hook/ViewsViewsExecutionHooks.php, line 23

Class

ViewsViewsExecutionHooks
Hook implementations for views.

Namespace

Drupal\views\Hook

Code

public function viewsQuerySubstitutions(ViewExecutable $view) {
    $substitutions = [
        '***CURRENT_VERSION***' => \Drupal::VERSION,
        '***CURRENT_TIME***' => \Drupal::time()->getRequestTime(),
    ] + PluginBase::queryLanguageSubstitutions();
    return $substitutions;
}
RSS feed
Powered by Drupal