class NodeViewsExecutionHooks
Hook implementations for node.
Hierarchy
- class \Drupal\node\Hook\NodeViewsExecutionHooks
Expanded class hierarchy of NodeViewsExecutionHooks
File
-
core/
modules/ node/ src/ Hook/ NodeViewsExecutionHooks.php, line 11
Namespace
Drupal\node\HookView source
class NodeViewsExecutionHooks {
/**
* Implements hook_views_query_substitutions().
*/
public function viewsQuerySubstitutions(ViewExecutable $view) {
$account = \Drupal::currentUser();
return [
'***ADMINISTER_NODES***' => intval($account->hasPermission('administer nodes')),
'***VIEW_OWN_UNPUBLISHED_NODES***' => intval($account->hasPermission('view own unpublished content')),
'***BYPASS_NODE_ACCESS***' => intval($account->hasPermission('bypass node access')),
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.