class ContentModerationViewsExecutionHooks

Hook implementations for content_moderation.

Hierarchy

Expanded class hierarchy of ContentModerationViewsExecutionHooks

File

core/modules/content_moderation/src/Hook/ContentModerationViewsExecutionHooks.php, line 11

Namespace

Drupal\content_moderation\Hook
View 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')),
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary
ContentModerationViewsExecutionHooks::viewsQuerySubstitutions public function Implements hook_views_query_substitutions().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.