You are here

public function NodeAccess::createGrant in Permissions by Term 8

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

Return value

NodeAccessRecordModel

File

src/Service/NodeAccess.php, line 94

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

public function createGrant($nid, $gid) {
  return $this->nodeAccessRecordFactory
    ->create(AccessStorage::NODE_ACCESS_REALM, $gid, $nid, $this->accessStorage
    ->getLangCode($nid), 0, 0);
}