private function NodeAccessRecordsTest::isNodeAccessRecordCreatedInPBTRealm in Permissions by Term 8.2
3 calls to NodeAccessRecordsTest::isNodeAccessRecordCreatedInPBTRealm()
- NodeAccessRecordsTest::testCreateIfTermHasNoPermissionButPermissionModeIsOn in tests/
src/ Kernel/ NodeAccessRecordsTest.php - NodeAccessRecordsTest::testCreateIfTermHasPermission in tests/
src/ Kernel/ NodeAccessRecordsTest.php - NodeAccessRecordsTest::testCreateNone in tests/
src/ Kernel/ NodeAccessRecordsTest.php
File
- tests/
src/ Kernel/ NodeAccessRecordsTest.php, line 126
Class
- NodeAccessRecordsTest
- Class AccessCheckTest
Namespace
Drupal\Tests\permissions_by_term\KernelCode
private function isNodeAccessRecordCreatedInPBTRealm(string $nid) : bool {
/**
* @var Connection $database
*/
$database = \Drupal::service('database');
$nodeAccessRecords = $database
->query('SELECT nid, realm FROM {node_access} WHERE nid = :nid AND realm = :realm', [
'nid' => $nid,
'realm' => 'permissions_by_term',
])
->fetchAll();
if (!empty($nodeAccessRecords)) {
return TRUE;
}
return FALSE;
}