mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Implemented Reciever
This commit is contained in:
@@ -42,5 +42,19 @@ class Node extends AbstractEntity implements NodeInterface
|
||||
{
|
||||
$this->law = new Law();
|
||||
$this->law->setNode($this);
|
||||
$this->initPermissions();
|
||||
}
|
||||
|
||||
private function initPermissions(): void
|
||||
{
|
||||
/*
|
||||
* @var RightInterface
|
||||
*/
|
||||
foreach ($this->law->getRights()->toArray() as $right) {
|
||||
$permission = new Permission();
|
||||
$permission->setNode($this);
|
||||
$permission->setRight($right);
|
||||
$right->addPermission($permission);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user