comparison core/modules/views/views.views_execution.inc @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children 12f9dff5fda9
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 /**
4 * @file
5 * Provides views runtime hooks for views.module.
6 */
7
8 use Drupal\views\ViewExecutable;
9 use Drupal\views\Plugin\views\PluginBase;
10
11 /**
12 * Implements hook_views_query_substitutions().
13 *
14 * Makes the following substitutions:
15 * - Current time.
16 * - Drupal version.
17 * - Special language codes; see
18 * \Drupal\views\Plugin\views\PluginBase::listLanguages().
19 */
20 function views_views_query_substitutions(ViewExecutable $view) {
21 $substitutions = [
22 '***CURRENT_VERSION***' => \Drupal::VERSION,
23 '***CURRENT_TIME***' => REQUEST_TIME,
24 ] + PluginBase::queryLanguageSubstitutions();
25
26 return $substitutions;
27 }