class UserViewsExecutionHooks
Hook implementations for user.
Hierarchy
- class \Drupal\user\Hook\UserViewsExecutionHooks
Expanded class hierarchy of UserViewsExecutionHooks
File
-
core/
modules/ user/ src/ Hook/ UserViewsExecutionHooks.php, line 11
Namespace
Drupal\user\HookView source
class UserViewsExecutionHooks {
/**
* Implements hook_views_query_substitutions().
*
* Allow replacement of current user ID so we can cache these queries.
*/
public function viewsQuerySubstitutions(ViewExecutable $view) {
return [
'***CURRENT_USER***' => \Drupal::currentUser()->id(),
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UserViewsExecutionHooks::viewsQuerySubstitutions | public | function | Implements hook_views_query_substitutions(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.