Show messages, when an element can not be deleted.

Fixes issue #43.
This commit is contained in:
Jan Böhmer 2020-05-17 21:52:47 +02:00
parent be47680b60
commit 8951940be1
6 changed files with 973 additions and 888 deletions

View file

@ -47,6 +47,7 @@ use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Parameters\GroupParameter;
use App\Security\Interfaces\HasPermissionsInterface;
use App\Validator\Constraints\ValidPermission;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
@ -102,10 +103,12 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
*/
protected $parameters;
public function __construct()
{
parent::__construct();
$this->permissions = new PermissionsEmbed();
$this->users = new ArrayCollection();
}
/**
@ -136,4 +139,9 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
{
return $this->permissions;
}
public function getUsers(): Collection
{
return $this->users;
}
}