3 // src/Rapsys/UserBundle/Entity/Group.php
4 namespace Rapsys\UserBundle\Entity
;
28 * @var \Doctrine\Common\Collections\Collection
34 * @param string $role The role name
36 public function __construct(string $role) {
37 $this->role
= (string) $role;
38 $this->users
= new \Doctrine\Common\Collections\
ArrayCollection();
48 public function setRole($role) {
59 public function getRole() {
64 * Returns a string representation of the role.
66 * @xxx Replace the deprecated "extends \Symfony\Component\Security\Core\Role\Role"
70 public function __toString(): string {
77 * @param \DateTime $created
81 public function setCreated($created) {
82 $this->created
= $created;
92 public function getCreated() {
93 return $this->created
;
99 * @param \DateTime $updated
103 public function setUpdated($updated) {
104 $this->updated
= $updated;
114 public function getUpdated() {
115 return $this->updated
;
121 * @param \Rapsys\UserBundle\Entity\User $user
125 public function addUser(\Rapsys\UserBundle\Entity\User
$user) {
126 $this->users
[] = $user;
134 * @param \Rapsys\UserBundle\Entity\User $user
136 public function removeUser(\Rapsys\UserBundle\Entity\User
$user) {
137 $this->users
->removeElement($user);
143 * @return \Doctrine\Common\Collections\Collection
145 public function getUsers() {