private function PermissionsGenerator::getEditPermission in Entity Construction Kit (ECK) 8
Retrieves the edit permission for a given entity type.
Parameters
\Drupal\eck\Entity\EckEntityType $entity_type: The entity type.
string $op: The operation.
string $ownership: The ownership.
Return value
array The edit permission.
1 call to PermissionsGenerator::getEditPermission()
- PermissionsGenerator::getEditPermissions in src/
PermissionsGenerator.php - Retrieves the edit permissions for a given entity type.
File
- src/
PermissionsGenerator.php, line 117
Class
- PermissionsGenerator
- Defines dynamic permissions.
Namespace
Drupal\eckCode
private function getEditPermission(EckEntityType $entity_type, $op, $ownership) {
$ucfirst_op = ucfirst($op);
return [
"{$op} {$ownership} {$entity_type->id()} entities" => [
'title' => $this
->t("{$ucfirst_op} {$ownership} %type_name entities", [
'%type_name' => $entity_type
->label(),
]),
],
];
}