<?php
namespace App\Entity;
use App\Repository\PageSatelliteRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PageSatelliteRepository::class)]
class PageSatellite
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $titre = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $alias_url = null;
#[ORM\Column(nullable: true)]
private ?bool $sommaire_affiche = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $content = null;
#[ORM\ManyToMany(targetEntity: Service::class, inversedBy: 'pageSatellites')]
private Collection $services;
#[ORM\ManyToMany(targetEntity: Document::class, inversedBy: 'pageSatellites')]
private Collection $documents;
#[ORM\ManyToMany(targetEntity: Contact::class, inversedBy: 'pageSatellites')]
private Collection $contacts;
#[ORM\ManyToOne(inversedBy: 'pageSatellites')]
private ?RssArticle $nordinfo_rss = null;
#[ORM\ManyToOne(inversedBy: 'pageSatellites')]
private ?Statut $statut = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $chapo = null;
#[ORM\ManyToMany(targetEntity: Epingle::class, inversedBy: 'pageSatellites')]
private Collection $epingles;
public function __construct()
{
$this->services = new ArrayCollection();
$this->documents = new ArrayCollection();
$this->contacts = new ArrayCollection();
$this->epingles = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getAliasUrl(): ?string
{
return $this->alias_url;
}
public function setAliasUrl(?string $alias_url): self
{
$this->alias_url = $alias_url;
return $this;
}
public function isSommaireAffiche(): ?bool
{
return $this->sommaire_affiche;
}
public function setSommaireAffiche(?bool $sommaire_affiche): self
{
$this->sommaire_affiche = $sommaire_affiche;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
/**
* @return Collection<int, Service>
*/
public function getServices(): Collection
{
return $this->services;
}
public function addService(Service $service): self
{
if (!$this->services->contains($service)) {
$this->services->add($service);
}
return $this;
}
public function removeService(Service $service): self
{
$this->services->removeElement($service);
return $this;
}
/**
* @return Collection<int, Document>
*/
public function getDocuments(): Collection
{
return $this->documents;
}
public function addDocument(Document $document): self
{
if (!$this->documents->contains($document)) {
$this->documents->add($document);
}
return $this;
}
public function removeDocument(Document $document): self
{
$this->documents->removeElement($document);
return $this;
}
/**
* @return Collection<int, Contact>
*/
public function getContacts(): Collection
{
return $this->contacts;
}
public function addContact(Contact $contact): self
{
if (!$this->contacts->contains($contact)) {
$this->contacts->add($contact);
}
return $this;
}
public function removeContact(Contact $contact): self
{
$this->contacts->removeElement($contact);
return $this;
}
public function getNordinfoRss(): ?RssArticle
{
return $this->nordinfo_rss;
}
public function setNordinfoRss(?RssArticle $nordinfo_rss): self
{
$this->nordinfo_rss = $nordinfo_rss;
return $this;
}
public function getStatut(): ?Statut
{
return $this->statut;
}
public function setStatut(?Statut $statut): self
{
$this->statut = $statut;
return $this;
}
public function getChapo(): ?string
{
return $this->chapo;
}
public function setChapo(?string $chapo): self
{
$this->chapo = $chapo;
return $this;
}
/**
* @return Collection<int, Epingle>
*/
public function getEpingles(): Collection
{
return $this->epingles;
}
public function addEpingle(Epingle $epingle): self
{
if (!$this->epingles->contains($epingle)) {
$this->epingles->add($epingle);
}
return $this;
}
public function removeEpingle(Epingle $epingle): self
{
$this->epingles->removeElement($epingle);
return $this;
}
}