mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Fix: authorization helper won't send a list of center if an admin is authenticated
This commit is contained in:
@@ -31,7 +31,7 @@ class GroupCenter
|
||||
* )
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
|
||||
*/
|
||||
private $center;
|
||||
private ?Center $center = null;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -40,83 +40,64 @@ class GroupCenter
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var PermissionsGroup
|
||||
*
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="Chill\MainBundle\Entity\PermissionsGroup",
|
||||
* inversedBy="groupCenters")
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
|
||||
*/
|
||||
private $permissionsGroup;
|
||||
private ?PermissionsGroup $permissionsGroup = null;
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
*
|
||||
* @ORM\ManyToMany(
|
||||
* targetEntity="Chill\MainBundle\Entity\User",
|
||||
* mappedBy="groupCenters"
|
||||
* )
|
||||
* @var Collection<User::class>
|
||||
*/
|
||||
private $users;
|
||||
private Collection $users;
|
||||
|
||||
/**
|
||||
* GroupCenter constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->permissionsGroup = new ArrayCollection();
|
||||
$this->users = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Center
|
||||
*/
|
||||
public function getCenter()
|
||||
public function getCenter(): ?Center
|
||||
{
|
||||
return $this->center;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PermissionGroup
|
||||
*/
|
||||
public function getPermissionsGroup()
|
||||
public function getPermissionsGroup(): ?PermissionsGroup
|
||||
{
|
||||
return $this->permissionsGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
* @return Collection<User::class>
|
||||
*/
|
||||
public function getUsers()
|
||||
public function getUsers(): Collection
|
||||
{
|
||||
return $this->users;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Chill\MainBundle\Entity\GroupCenter
|
||||
*/
|
||||
public function setCenter(Center $center)
|
||||
public function setCenter(Center $center): self
|
||||
{
|
||||
$this->center = $center;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Chill\MainBundle\Entity\GroupCenter
|
||||
*/
|
||||
public function setPermissionsGroup(PermissionsGroup $permissionsGroup)
|
||||
public function setPermissionsGroup(PermissionsGroup $permissionsGroup): self
|
||||
{
|
||||
$this->permissionsGroup = $permissionsGroup;
|
||||
|
||||
|
Reference in New Issue
Block a user