Deprecated: Constant E_STRICT is deprecated in /var/www/PixelForce/vendor/symfony/error-handler/ErrorHandler.php on line 58
Deprecated: Constant E_STRICT is deprecated in /var/www/PixelForce/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler
<?php
namespace App\Entity;
use App\Repository\MeetingStateRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=MeetingStateRepository::class)
* @UniqueEntity(fields="name", message="Meeting state name is already taken.")
*/
class MeetingState implements JsonSerializable
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity="Meeting", mappedBy="meetingState")
*/
private $meetings;
public function __construct() {
$this->meetings = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function jsonSerialize()
{
$vars = get_object_vars($this);
return $vars;
}
/**
* @return Collection<int, Meeting>
*/
public function getMeetings(): Collection
{
return $this->meetings;
}
public function addMeeting(Meeting $meeting): static
{
if (!$this->meetings->contains($meeting)) {
$this->meetings->add($meeting);
$meeting->setMeetingState($this);
}
return $this;
}
public function removeMeeting(Meeting $meeting): static
{
if ($this->meetings->removeElement($meeting)) {
// set the owning side to null (unless already changed)
if ($meeting->getMeetingState() === $this) {
$meeting->setMeetingState(null);
}
}
return $this;
}
}