fc68293410c257e3b495839a29b4c84afabbf194
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / node_grants.twig
1 /**
2  * Implements hook_node_grants().
3  */
4 function {{ machine_name }}_node_grants(\Drupal\Core\Session\AccountInterface $account, $op) {
5   if ($account->hasPermission('access private content')) {
6     $grants['example'] = [1];
7   }
8   if ($account->id()) {
9     $grants['example_author'] = [$account->id()];
10   }
11   return $grants;
12 }