<?phpnamespace App\Entity\Webfactory\Actualites;use App\Repository\Webfactory\Actualites\WebfactoryActualiteBibliothequeRepository;use DateTimeImmutable;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: WebfactoryActualiteBibliothequeRepository::class)]class WebfactoryActualiteBibliotheque{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255, nullable: true)] private ?string $author = null; #[ORM\Column(length: 255, nullable: true)] private ?string $image = null; #[ORM\Column] private ?DateTimeImmutable $created_at = null; #[ORM\Column] private ?DateTimeImmutable $updated_at = null; #[ORM\Column] private ?bool $active = null; #[ORM\OneToMany(mappedBy: 'actualiteBibliotheque', targetEntity: WebfactoryActualiteBibliothequeContenu::class)] private Collection $webfactoryActualiteBibliothequeContenus; #[ORM\OneToMany(mappedBy: 'actualiteBibliotheque', targetEntity: WebfactoryActualite::class)] private Collection $webfactoryActualites; #[ORM\ManyToOne(inversedBy: 'webfactoryActualiteBibliotheques')] private ?WebfactoryActualiteCategory $webfactoryCategory = null; public function __construct() { $this->webfactoryActualiteBibliothequeContenus = new ArrayCollection(); $this->webfactoryActualites = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getAuthor(): ?string { return $this->author; } public function setAuthor(?string $author): static { $this->author = $author; return $this; } public function getImage(): ?string { return $this->image; } public function setImage(?string $image): static { $this->image = $image; return $this; } public function getCreatedAt(): ?DateTimeImmutable { return $this->created_at; } public function setCreatedAt(DateTimeImmutable $created_at): static { $this->created_at = $created_at; return $this; } public function getUpdatedAt(): ?DateTimeImmutable { return $this->updated_at; } public function setUpdatedAt(DateTimeImmutable $updated_at): static { $this->updated_at = $updated_at; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(bool $active): static { $this->active = $active; return $this; } /** * @return Collection<int, WebfactoryActualiteBibliothequeContenu> */ public function getWebfactoryActualiteBibliothequeContenus(): Collection { return $this->webfactoryActualiteBibliothequeContenus; } public function addWebfactoryActualiteBibliothequeContenu(WebfactoryActualiteBibliothequeContenu $webfactoryActualiteBibliothequeContenu): static { if (!$this->webfactoryActualiteBibliothequeContenus->contains($webfactoryActualiteBibliothequeContenu)) { $this->webfactoryActualiteBibliothequeContenus->add($webfactoryActualiteBibliothequeContenu); $webfactoryActualiteBibliothequeContenu->setActualiteBibliotheque($this); } return $this; } public function removeWebfactoryActualiteBibliothequeContenu(WebfactoryActualiteBibliothequeContenu $webfactoryActualiteBibliothequeContenu): static { if ($this->webfactoryActualiteBibliothequeContenus->removeElement($webfactoryActualiteBibliothequeContenu)) { // set the owning side to null (unless already changed) if ($webfactoryActualiteBibliothequeContenu->getActualiteBibliotheque() === $this) { $webfactoryActualiteBibliothequeContenu->setActualiteBibliotheque(null); } } return $this; } /** * @return Collection<int, WebfactoryActualite> */ public function getWebfactoryActualites(): Collection { return $this->webfactoryActualites; } public function addWebfactoryActualite(WebfactoryActualite $webfactoryActualite): static { if (!$this->webfactoryActualites->contains($webfactoryActualite)) { $this->webfactoryActualites->add($webfactoryActualite); $webfactoryActualite->setActualiteBibliotheque($this); } return $this; } public function removeWebfactoryActualite(WebfactoryActualite $webfactoryActualite): static { if ($this->webfactoryActualites->removeElement($webfactoryActualite)) { // set the owning side to null (unless already changed) if ($webfactoryActualite->getActualiteBibliotheque() === $this) { $webfactoryActualite->setActualiteBibliotheque(null); } } return $this; } public function getWebfactoryCategory(): ?WebfactoryActualiteCategory { return $this->webfactoryCategory; } public function setWebfactoryCategory(?WebfactoryActualiteCategory $webfactoryCategory): static { $this->webfactoryCategory = $webfactoryCategory; return $this; } public function toArray(): array { return get_object_vars($this); }}