2013-04-10 20:12:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Provide views runtime hooks for user.module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
use Drupal\views\ViewExecutable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_views_query_substitutions().
|
|
|
|
*
|
Issue #2829185 by vaplas, Jo Fitzgerald, anmolgoyal74, chipway, gaurav.kapoor, mark_fullmer, amit.drupal, cilefen, longwave, xjm, wturrell, anavarre: Fix spelling errors in Drupal core comments
2018-09-20 16:12:38 +00:00
|
|
|
* Allow replacement of current user ID so we can cache these queries.
|
2013-04-10 20:12:01 +00:00
|
|
|
*/
|
|
|
|
function user_views_query_substitutions(ViewExecutable $view) {
|
2017-03-04 01:20:24 +00:00
|
|
|
return ['***CURRENT_USER***' => \Drupal::currentUser()->id()];
|
2013-04-10 20:12:01 +00:00
|
|
|
}
|