views_views_query_substitutions

views_views_query_substitutions(ViewExecutable $view)

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/views.views_execution.inc, line 20
Provides views runtime hooks for views.module.

Code

1
2
3
4
5
6
7
8
function views_views_query_substitutions(ViewExecutable $view) {
  $substitutions = array(
    '***CURRENT_VERSION***' => \Drupal::VERSION,
    '***CURRENT_TIME***' => REQUEST_TIME,
  ) + PluginBase::queryLanguageSubstitutions();
 
  return $substitutions;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.