Newer
Older
Angie Byron
committed
<?php
/**
* @file
* Provides views runtime hooks for views.module.
*/
use Drupal\views\ViewExecutable;
Angie Byron
committed
use Drupal\views\Plugin\views\PluginBase;
Angie Byron
committed
/**
* Implements hook_views_query_substitutions().
*
Angie Byron
committed
* Makes the following substitutions:
* - Current time.
* - Drupal version.
* - Special language codes; see
* \Drupal\views\Plugin\views\PluginBase::listLanguages().
Angie Byron
committed
*/
function views_views_query_substitutions(ViewExecutable $view) {
Angie Byron
committed
$substitutions = array(
'***CURRENT_VERSION***' => \Drupal::VERSION,
Angie Byron
committed
'***CURRENT_TIME***' => REQUEST_TIME,
Angie Byron
committed
) + PluginBase::queryLanguageSubstitutions();
return $substitutions;