protected function NodeTypeAccessService::permittedBundleIds in Nodetype access 8
2 calls to NodeTypeAccessService::permittedBundleIds()
File
- src/
NodeTypeAccessService.php, line 50
Class
Namespace
Drupal\nodetype_accessCode
protected function permittedBundleIds(AccountInterface $account) {
$bundleIds = [];
foreach ($this->entityTypeBundleInfo
->getAllBundleInfo()['node'] as $bundleId => $info) {
if ($account
->hasPermission($this
->makeViewAnyPermissionId($bundleId))) {
$bundleIds[$bundleId] = $bundleId;
}
}
return $bundleIds;
}