public function NodeOptionPremiumPermissions::nodeTypePermissions in Node Option Premium 8
Returns an array of node type permissions.
Return value
array The node type permissions.
See also
\Drupal\user\PermissionHandlerInterface::getPermissions()
1 string reference to 'NodeOptionPremiumPermissions::nodeTypePermissions'
File
- src/
NodeOptionPremiumPermissions.php, line 23
Class
- NodeOptionPremiumPermissions
- Provides dynamic permissions for nodes of different types for promoted.
Namespace
Drupal\nopremiumCode
public function nodeTypePermissions() {
$perms = [];
// Generate node permissions for all node types.
foreach (NodeType::loadMultiple() as $type) {
$perms += $this
->buildPermissions($type);
}
return $perms;
}