content_moderation.views_execution.inc
Same filename in other branches
Provide views runtime hooks for content_moderation.module.
File
-
core/
modules/ content_moderation/ content_moderation.views_execution.inc
View source
<?php
/**
* @file
* Provide views runtime hooks for content_moderation.module.
*/
use Drupal\views\ViewExecutable;
/**
* Implements hook_views_query_substitutions().
*/
function content_moderation_views_query_substitutions(ViewExecutable $view) {
$account = \Drupal::currentUser();
return [
'***VIEW_ANY_UNPUBLISHED_NODES***' => intval($account->hasPermission('view any unpublished content')),
];
}
Functions
Title | Deprecated | Summary |
---|---|---|
content_moderation_views_query_substitutions | Implements hook_views_query_substitutions(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.