function content_moderation_views_query_substitutions
Same name in other branches
- 9 core/modules/content_moderation/content_moderation.views_execution.inc \content_moderation_views_query_substitutions()
- 8.9.x core/modules/content_moderation/content_moderation.views_execution.inc \content_moderation_views_query_substitutions()
- 11.x core/modules/content_moderation/content_moderation.views_execution.inc \content_moderation_views_query_substitutions()
Implements hook_views_query_substitutions().
File
-
core/
modules/ content_moderation/ content_moderation.views_execution.inc, line 13
Code
function content_moderation_views_query_substitutions(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.