Mercurial > hg > cmmr2012-drupal-site
annotate 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 |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /** |
Chris@0 | 4 * @file |
Chris@0 | 5 * Provides views runtime hooks for views.module. |
Chris@0 | 6 */ |
Chris@0 | 7 |
Chris@0 | 8 use Drupal\views\ViewExecutable; |
Chris@0 | 9 use Drupal\views\Plugin\views\PluginBase; |
Chris@0 | 10 |
Chris@0 | 11 /** |
Chris@0 | 12 * Implements hook_views_query_substitutions(). |
Chris@0 | 13 * |
Chris@0 | 14 * Makes the following substitutions: |
Chris@0 | 15 * - Current time. |
Chris@0 | 16 * - Drupal version. |
Chris@0 | 17 * - Special language codes; see |
Chris@0 | 18 * \Drupal\views\Plugin\views\PluginBase::listLanguages(). |
Chris@0 | 19 */ |
Chris@0 | 20 function views_views_query_substitutions(ViewExecutable $view) { |
Chris@0 | 21 $substitutions = [ |
Chris@0 | 22 '***CURRENT_VERSION***' => \Drupal::VERSION, |
Chris@0 | 23 '***CURRENT_TIME***' => REQUEST_TIME, |
Chris@0 | 24 ] + PluginBase::queryLanguageSubstitutions(); |
Chris@0 | 25 |
Chris@0 | 26 return $substitutions; |
Chris@0 | 27 } |