1 <?php
declare(strict_types
=1);
4 * This file is part of the Rapsys PackBundle package.
6 * (c) Raphaël Gertz <symfony@rapsys.eu>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Rapsys\UserBundle\Entity
;
14 use Doctrine\Common\Collections\ArrayCollection
;
16 use Rapsys\UserBundle\Entity\User
;
43 * @var ArrayCollection
50 public function __construct() {
51 $this->users
= new ArrayCollection();
59 public function getId(): int {
66 * @param string $title
70 public function setTitle(string $title) {
71 $this->title
= $title;
81 public function getTitle(): ?string {
88 * @param \DateTime $created
92 public function setCreated(\DateTime
$created) {
93 $this->created
= $created;
103 public function getCreated(): \DateTime
{
104 return $this->created
;
110 * @param \DateTime $updated
114 public function setUpdated(\DateTime
$updated) {
115 $this->updated
= $updated;
125 public function getUpdated(): \DateTime
{
126 return $this->updated
;
136 public function addUser(User
$user): Civility
{
137 $this->users
[] = $user;
147 public function removeUser(User
$user) {
148 $this->users
->removeElement($user);
154 * @return ArrayCollection
156 public function getUsers(): ArrayCollection
{
161 * Returns a string representation of the title
165 public function __toString(): string {