public function NodeTypeAccessService::permissions in Nodetype access 8
Permissions callback.
Defines a 'view any $type content' permission.
File
- src/
NodeTypeAccessService.php, line 40
Class
Namespace
Drupal\nodetype_accessCode
public function permissions() {
$permissions = array();
foreach ($this->entityTypeBundleInfo
->getBundleInfo('node') as $bundleId => $info) {
$permissions[$this
->makeViewAnyPermissionId($bundleId)] = [
'title' => t('View published %bundle_label content', array(
'%bundle_label' => $info['label'],
)),
];
}
return $permissions;
}