function ContentModerationViewsExecutionHooks::viewsQuerySubstitutions
Implements hook_views_query_substitutions().
File
-
core/
modules/ content_moderation/ src/ Hook/ ContentModerationViewsExecutionHooks.php, line 16
Class
- ContentModerationViewsExecutionHooks
- Hook implementations for content_moderation.
Namespace
Drupal\content_moderation\HookCode
public function viewsQuerySubstitutions(ViewExecutable $view) {
$account = \Drupal::currentUser();
return [
'***VIEW_ANY_UNPUBLISHED_NODES***' => intval($account->hasPermission('view any unpublished content')),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.