public function NodeAccess::getGrantsByNid in Permissions by Term 8
Same name and namespace in other branches
- 8.2 src/Service/NodeAccess.php \Drupal\permissions_by_term\Service\NodeAccess::getGrantsByNid()
Parameters
$nid:
Return value
array
File
- src/
Service/ NodeAccess.php, line 233
Class
- NodeAccess
- Class NodeAccess
Namespace
Drupal\permissions_by_term\ServiceCode
public function getGrantsByNid($nid) {
$grants = [];
foreach ($this->grants as $grant) {
if ($grant->nid == $nid) {
$grants[] = $grant;
}
}
return $grants;
}