5 * Provide views runtime hooks for user.module.
8 use Drupal\views\ViewExecutable;
11 * Implements hook_views_query_substitutions().
13 * Allow replacement of current user ID so we can cache these queries.
15 function user_views_query_substitutions(ViewExecutable $view) {
16 return ['***CURRENT_USER***' => \Drupal::currentUser()->id()];