Mercurial > hg > isophonics-drupal-site
comparison core/modules/user/user.views_execution.inc @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Provide views runtime hooks for user.module. | |
6 */ | |
7 | |
8 use Drupal\views\ViewExecutable; | |
9 | |
10 /** | |
11 * Implements hook_views_query_substitutions(). | |
12 * | |
13 * Allow replacement of current userid so we can cache these queries. | |
14 */ | |
15 function user_views_query_substitutions(ViewExecutable $view) { | |
16 return ['***CURRENT_USER***' => \Drupal::currentUser()->id()]; | |
17 } |