<?php
namespace App\Entity;
use App\Repository\PagesRepository;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Stringable;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Doctrine\ORM\Mapping as ORM;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: PagesRepository::class)]
class Pages implements Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $filename = null;
/**
* @Vich\UploadableField(mapping="images", fileNameProperty="filename")
*/
private ?File $file = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $titre = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $meta_titre = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $meta_description = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private mixed $date_updated;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $content = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $actif;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $credits = null;
#[ORM\ManyToOne(targetEntity: Contact::class, inversedBy: 'pages')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $contact1;
#[ORM\ManyToOne(targetEntity: Contact::class, inversedBy: 'pages2')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $contact2;
#[ORM\ManyToOne(targetEntity: Contact::class, inversedBy: 'pages3')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $contact3;
#[ORM\ManyToOne(targetEntity: Organization::class, inversedBy: 'pages1')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $organisation1;
#[ORM\ManyToOne(targetEntity: Organization::class, inversedBy: 'pages2')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $organisation2;
#[ORM\ManyToOne(targetEntity: Organization::class, inversedBy: 'pages3')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $organisation3;
#[ORM\ManyToOne(targetEntity: Post::class, inversedBy: 'pages1')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $related_post1;
#[ORM\ManyToOne(targetEntity: Post::class, inversedBy: 'pages2')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $related_post2;
#[ORM\ManyToOne(targetEntity: Post::class, inversedBy: 'pages3')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private mixed $related_post3;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $document_name1 = null;
/**
* @Vich\UploadableField(mapping="documents", fileNameProperty="document_name1")
*/
private ?File $document1 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $document_name2 = null;
/**
* @Vich\UploadableField(mapping="documents", fileNameProperty="document_name2")
*/
private ?File $document2 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $document_name3 = null;
/**
* @Vich\UploadableField(mapping="documents", fileNameProperty="document_name3")
*/
private ?File $document3 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $link1 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $url1 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $link2 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $url2 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $link3 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $url3 = null;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $ordre;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $nordinfo = false;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $lenord = false;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $alias_url = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $url_icone = null;
/**
* @Vich\UploadableField(mapping="url_icon_images", fileNameProperty="url_icone")
*/
private ?File $urlIconFile = null;
#[ORM\ManyToMany(targetEntity: Epingle::class, mappedBy: 'visible_institutions')]
private mixed $epingles;
#[ORM\ManyToOne(targetEntity: RssArticle::class, inversedBy: 'pages')]
private mixed $nordinfo_rss;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $sommaire_affiche;
public function __construct()
{
$this->epingles = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function setFile(File $file = null): void
{
$this->file = $file;
if ($file) {
$this->date_updated = new DateTime('now');
}
}
public function getFile(): mixed
{
return $this->file;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename = null): mixed
{
$this->filename = $filename;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getMetaTitre(): ?string
{
return $this->meta_titre;
}
public function setMetaTitre(?string $meta_titre): self
{
$this->meta_titre = $meta_titre;
return $this;
}
public function getMetaDescription(): ?string
{
return $this->meta_description;
}
public function setMetaDescription(?string $meta_description): self
{
$this->meta_description = $meta_description;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getActif(): ?bool
{
return $this->actif;
}
public function setActif(?bool $actif): self
{
$this->actif = $actif;
return $this;
}
public function getCredits(): ?string
{
return $this->credits;
}
public function setCredits(?string $credits): self
{
$this->credits = $credits;
return $this;
}
public function getContact1(): ?Contact
{
return $this->contact1;
}
public function setContact1(?Contact $contact1): self
{
$this->contact1 = $contact1;
return $this;
}
public function getContact2(): ?Contact
{
return $this->contact2;
}
public function setContact2(?Contact $contact2): self
{
$this->contact2 = $contact2;
return $this;
}
public function getContact3(): ?Contact
{
return $this->contact3;
}
public function setContact3(?Contact $contact3): self
{
$this->contact3 = $contact3;
return $this;
}
public function getOrganisation1(): ?Organization
{
return $this->organisation1;
}
public function setOrganisation1(?Organization $organisation1): self
{
$this->organisation1 = $organisation1;
return $this;
}
public function getOrganisation2(): ?Organization
{
return $this->organisation2;
}
public function setOrganisation2(?Organization $organisation2): self
{
$this->organisation2 = $organisation2;
return $this;
}
public function getOrganisation3(): ?Organization
{
return $this->organisation3;
}
public function setOrganisation3(?Organization $organisation3): self
{
$this->organisation3 = $organisation3;
return $this;
}
public function getRelatedPost1(): ?Post
{
return $this->related_post1;
}
public function setRelatedPost1(?Post $related_post1): self
{
$this->related_post1 = $related_post1;
return $this;
}
public function getRelatedPost2(): ?Post
{
return $this->related_post2;
}
public function setRelatedPost2(?Post $related_post2): self
{
$this->related_post2 = $related_post2;
return $this;
}
public function getRelatedPost3(): ?Post
{
return $this->related_post3;
}
public function setRelatedPost3(?Post $related_post3): self
{
$this->related_post3 = $related_post3;
return $this;
}
public function getDocumentName1(): ?string
{
return $this->document_name1;
}
public function setDocumentName1(?string $document_name1): self
{
$this->document_name1 = $document_name1;
return $this;
}
public function getDocumentName2(): ?string
{
return $this->document_name2;
}
public function setDocumentName2(?string $document_name2): self
{
$this->document_name2 = $document_name2;
return $this;
}
public function getDocumentName3(): ?string
{
return $this->document_name3;
}
public function setDocumentName3(?string $document_name3): self
{
$this->document_name3 = $document_name3;
return $this;
}
public function getLink1(): ?string
{
return $this->link1;
}
public function setLink1(?string $link1): self
{
$this->link1 = $link1;
return $this;
}
public function getUrl1(): ?string
{
return $this->url1;
}
public function setUrl1(?string $url1): self
{
$this->url1 = $url1;
return $this;
}
public function getLink2(): ?string
{
return $this->link2;
}
public function setLink2(?string $link2): self
{
$this->link2 = $link2;
return $this;
}
public function getUrl2(): ?string
{
return $this->url2;
}
public function setUrl2(?string $url2): self
{
$this->url2 = $url2;
return $this;
}
public function getLink3(): ?string
{
return $this->link3;
}
public function setLink3(?string $link3): self
{
$this->link3 = $link3;
return $this;
}
public function getUrl3(): ?string
{
return $this->url3;
}
public function setUrl3(?string $url3): self
{
$this->url3 = $url3;
return $this;
}
public function setDocument1(File $file = null): void
{
$this->document1 = $file;
if ($file) {
$this->date_updated = new DateTime('now');
}
}
public function getDocument1(): mixed
{
return $this->document1;
}
public function setDocument2(File $file = null): void
{
$this->document2 = $file;
if ($file) {
$this->date_updated = new DateTime('now');
}
}
public function getDocument2(): mixed
{
return $this->document2;
}
public function setDocument3(File $file = null): void
{
$this->document3 = $file;
if ($file) {
$this->date_updated = new DateTime('now');
}
}
public function getDocument3(): mixed
{
return $this->document3;
}
public function __toString(): string
{
return (string)$this->titre;
}
public function getOrdre(): ?int
{
return $this->ordre;
}
public function setOrdre(?int $ordre): self
{
$this->ordre = $ordre;
return $this;
}
public function getNordinfo(): ?bool
{
return $this->nordinfo;
}
public function setNordinfo(?bool $nordinfo): self
{
$this->nordinfo = $nordinfo;
return $this;
}
public function getLenord(): ?bool
{
return $this->lenord;
}
public function setLenord(?bool $lenord): self
{
$this->lenord = $lenord;
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 getUrlIcone(): ?string
{
return $this->url_icone;
}
public function setUrlIcone(?string $url_icone): self
{
$this->url_icone = $url_icone;
return $this;
}
public function setUrlIconFile(?File $urlIconFile = null): void
{
$this->urlIconFile = $urlIconFile;
if ($urlIconFile) {
$this->date_updated = new DateTime('now');
}
}
public function getUrlIconFile(): ?File
{
return $this->urlIconFile;
}
/**
* @return Collection
*/
public function getEpingles(): Collection
{
return $this->epingles;
}
public function addEpingle(Epingle $epingle): self
{
if (!$this->epingles->contains($epingle)) {
$this->epingles[] = $epingle;
$epingle->addVisibleInstitution($this);
}
return $this;
}
public function removeEpingle(Epingle $epingle): self
{
if ($this->epingles->removeElement($epingle)) {
$epingle->removeVisibleInstitution($this);
}
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 getSommaireAffiche(): ?bool
{
return $this->sommaire_affiche;
}
public function setSommaireAffiche(?bool $sommaire_affiche): self
{
$this->sommaire_affiche = $sommaire_affiche;
return $this;
}
}