user.views_execution.inc in Zircon Profile 8.0
Same filename and directory in other branches
Provide views runtime hooks for user.module.
File
core/modules/user/user.views_execution.incView source
<?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(),
);
}
Functions
Name | Description |
---|---|
user_views_query_substitutions | Implements hook_views_query_substitutions(). |