private function PermissionsGenerator::getCreatePermission in Entity Construction Kit (ECK) 8
Retrieves the create permission for a given entity type.
Parameters
\Drupal\eck\Entity\EckEntityType $entity_type: The entity type.
Return value
array The create permission.
1 call to PermissionsGenerator::getCreatePermission()
- PermissionsGenerator::buildPermissions in src/
PermissionsGenerator.php - Builds a standard list of entity permissions for a given type.
File
- src/
PermissionsGenerator.php, line 76
Class
- PermissionsGenerator
- Defines dynamic permissions.
Namespace
Drupal\eckCode
private function getCreatePermission(EckEntityType $entity_type) {
return [
"create {$entity_type->id()} entities" => [
'title' => $this
->t('Create new %type_name entities', [
'%type_name' => $entity_type
->label(),
]),
],
];
}