You are here

public function NodeAccess::getGrantsByNid in Permissions by Term 8.2

Same name and namespace in other branches
  1. 8 src/Service/NodeAccess.php \Drupal\permissions_by_term\Service\NodeAccess::getGrantsByNid()

Parameters

$nid:

Return value

array

File

src/Service/NodeAccess.php, line 199

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

public function getGrantsByNid($nid) {
  $grants = [];
  foreach ($this->grants as $grant) {
    if ($grant->nid == $nid) {
      $grants[] = $grant;
    }
  }
  return $grants;
}