Mercurial > hg > cmmr2012-drupal-site
view core/modules/content_moderation/content_moderation.views_execution.inc @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | |
children |
line wrap: on
line 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')), ]; }