Mercurial > hg > cmmr2012-drupal-site
view core/modules/user/user.views_execution.inc @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line source
<?php /** * @file * Provide views runtime hooks for user.module. */ use Drupal\views\ViewExecutable; /** * Implements hook_views_query_substitutions(). * * Allow replacement of current user ID so we can cache these queries. */ function user_views_query_substitutions(ViewExecutable $view) { return ['***CURRENT_USER***' => \Drupal::currentUser()->id()]; }