Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
17
core/modules/user/user.views_execution.inc
Normal file
17
core/modules/user/user.views_execution.inc
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Provide views runtime hooks for user.module.
|
||||
*/
|
||||
|
||||
use Drupal\views\ViewExecutable;
|
||||
|
||||
/**
|
||||
* Implements hook_views_query_substitutions().
|
||||
*
|
||||
* Allow replacement of current userid so we can cache these queries.
|
||||
*/
|
||||
function user_views_query_substitutions(ViewExecutable $view) {
|
||||
return array('***CURRENT_USER***' => \Drupal::currentUser()->id());
|
||||
}
|
Reference in a new issue