src/Entity/AbstractAuthors.php line 12
<?phpnamespace App\Entity;use App\Repository\AbstractAuthorsRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AbstractAuthorsRepository::class)]class AbstractAuthors{const RESIDENT = 0;const SPECIALISTE = 1;const ASSISTANT = 2;const PROF = 3;const PROFAGREGE = 4;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255, nullable: true)]private ?string $firstName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $lastName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $service = null;#[ORM\Column(type: Types::SMALLINT, nullable: true)]private ?int $title = null;#[ORM\Column(type: Types::SMALLINT, nullable: true)]private ?int $isResponsible = null;#[ORM\Column(type: Types::SMALLINT, nullable: true)]private ?int $isPresenter = null;#[ORM\OneToMany(targetEntity: EventAbstract::class, mappedBy: 'responsable')]private Collection $eventAbstractAsResponsable;#[ORM\ManyToMany(targetEntity: EventAbstract::class, mappedBy: 'presenters')]private Collection $eventAbstractsAsPresenter;# [ORM\ManyToMany(targetEntity: EventAbstract::class, mappedBy: 'authors')]private Collection $eventAbstractsAsAuthors;#[ORM\ManyToOne]private ?EventAbstract $abstract = null;public function __construct(){$this->eventAbstractAsResponsable = new ArrayCollection();$this->eventAbstractsAsPresenter = new ArrayCollection();$this->eventAbstractsAsAuthors = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getFirstName(): ?string{return $this->firstName;}public function setFirstName(?string $firstName): static{$this->firstName = $firstName;return $this;}public function getService(): ?string{return $this->service;}public function setService(?string $service): static{$this->service = $service;return $this;}public function getTitle(): ?int{return $this->title;}public function setTitle(?int $title): static{$this->title = $title;return $this;}public function getIsResponsible(): ?int{return $this->isResponsible;}public function setIsResponsible(?int $isResponsible): static{$this->isResponsible = $isResponsible;return $this;}public function getIsPresenter(): ?int{return $this->isPresenter;}public function setIsPresenter(?int $isPresenter): static{$this->isPresenter = $isPresenter;return $this;}/*** cette fonction retourne les abstratcs où l'auteur est responsable d'abstract* @return Collection<int, EventAbstract>*/public function getEventAbstractAsResponsable(): Collection{return $this->eventAbstractAsResponsable;}/*** cette fonction ajoute un abstract à la liste des abstracts où l'auteur est responsable* @param EventAbstract $eventAbstract* @return self*/public function addEventAbstractAsResponsable(EventAbstract $eventAbstract): static{if (!$this->eventAbstractAsResponsable->contains($eventAbstract)) {$this->eventAbstractAsResponsable->add($eventAbstract);$eventAbstract->setResponsable($this);}return $this;}/*** cette fonction enlève un abstract de la liste des abstracts où l'auteur est responsable* @param EventAbstract $eventAbstract* @return self*/public function removeEventAbstractAsResponsable(EventAbstract $eventAbstract): static{if ($this->eventAbstractAsResponsable->removeElement($eventAbstract)) {// set the owning side to null (unless already changed)if ($eventAbstract->getResponsable() === $this) {$eventAbstract->setResponsable(null);}}return $this;}/*** Cette fonction retourne les abstracts où l'auteur a été présentateur* @return Collection<int, EventAbstract>*/public function getEventAbstractsAsPresenter(): Collection{return $this->eventAbstractsAsPresenter;}/*** cette fonction ajoute un abstract à la liste des abstracts où l'auteur est présnateur* @param EventAbstract $eventAbstract* @return self*/public function addEventAbstractAsPresenter(EventAbstract $eventAbstract): static{if (!$this->eventAbstractsAsPresenter->contains($eventAbstract)) {$this->eventAbstractsAsPresenter->add($eventAbstract);$eventAbstract->addPresenter($this);}return $this;}/*** cette fonction ajoute un abstract à la liste des abstracts où l'auteur est présentateur* @param EventAbstract $eventAbstract* @return self*/public function removeEventAbstractAsPresenter(EventAbstract $eventAbstract): static{if ($this->eventAbstractsAsPresenter->removeElement($eventAbstract)) {if ($eventAbstract->getPresenters()->contains($this)) {$eventAbstract->removePresenter($this);}}return $this;}public function getLastName(): ?string{return $this->lastName;}public function setLastName(?string $lastName): static{$this->lastName = $lastName;return $this;}public function getAbstract(): ?EventAbstract{return $this->abstract;}public function setAbstract(?EventAbstract $abstract): static{$this->abstract = $abstract;return $this;}/*** Get the value of eventAbstractsAuthors*/public function getEventAbstractsAsAuthors(){return $this->eventAbstractsAsAuthors;}/*** Set the value of eventAbstractsAuthors** @return self*/public function setEventAbstractsAsAuthors($eventAbstractsAsAuthors){$this->eventAbstractsAsAuthors = $eventAbstractsAsAuthors;return $this;}/*** cette fonction ajoute un abstract à la liste des abstracts où l'auteur est présnateur* @param EventAbstract $eventAbstract* @return self*/public function addEventAbstractsAuthor(EventAbstract $eventAbstract): static{if (!$this->eventAbstractsAsAuthors->contains($eventAbstract)) {$this->eventAbstractsAsAuthors->add($eventAbstract);$eventAbstract->addAuthor($this);}return $this;}/*** cette fonction ajoute un abstract à la liste des abstracts où l'auteur est présentateur* @param EventAbstract $eventAbstract* @return self*/public function removeEventAbstractsAuthor(EventAbstract $eventAbstract): static{if ($this->eventAbstractsAsAuthors->removeElement($eventAbstract)) {if ($eventAbstract->getAuthors()->contains($this)) {$eventAbstract->removeAuthor($this);}}return $this;}}