class ContentModerationViewsExecutionHooks
Hook implementations for content_moderation.
Hierarchy
- class \Drupal\content_moderation\Hook\ContentModerationViewsExecutionHooks
Expanded class hierarchy of ContentModerationViewsExecutionHooks
File
-
core/
modules/ content_moderation/ src/ Hook/ ContentModerationViewsExecutionHooks.php, line 11
Namespace
Drupal\content_moderation\HookView source
class ContentModerationViewsExecutionHooks {
/**
* Implements hook_views_query_substitutions().
*/
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.