src/Entity/Pages.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PagesRepository;
  4. use DateTime;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Stringable;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @Vich\Uploadable
  13.  */
  14. #[ORM\Entity(repositoryClassPagesRepository::class)]
  15. class Pages implements Stringable
  16. {
  17.   #[ORM\Id]
  18.   #[ORM\GeneratedValue]
  19.   #[ORM\Column(type'integer')]
  20.   private int $id;
  21.   #[ORM\Column(type'string'length255nullabletrue)]
  22.   private ?string $filename null;
  23.   /**
  24.    * @Vich\UploadableField(mapping="images", fileNameProperty="filename")
  25.    */
  26.   private ?File $file null;
  27.   #[ORM\Column(type'string'length255nullabletrue)]
  28.   private ?string $titre null;
  29.   #[ORM\Column(type'string'length255nullabletrue)]
  30.   private ?string $meta_titre null;
  31.   #[ORM\Column(type'string'length255nullabletrue)]
  32.   private ?string $meta_description null;
  33.   #[ORM\Column(type'datetime'nullabletrue)]
  34.   private mixed $date_updated;
  35.   #[ORM\Column(type'text'nullabletrue)]
  36.   private ?string $content null;
  37.   #[ORM\Column(type'boolean'nullabletrue)]
  38.   private ?bool $actif;
  39.   #[ORM\Column(type'string'length255nullabletrue)]
  40.   private ?string $credits null;
  41.   #[ORM\ManyToOne(targetEntityContact::class, inversedBy'pages')]
  42.   #[ORM\JoinColumn(onDelete'SET NULL')]
  43.   private mixed $contact1;
  44.   #[ORM\ManyToOne(targetEntityContact::class, inversedBy'pages2')]
  45.   #[ORM\JoinColumn(onDelete'SET NULL')]
  46.   private mixed $contact2;
  47.   #[ORM\ManyToOne(targetEntityContact::class, inversedBy'pages3')]
  48.   #[ORM\JoinColumn(onDelete'SET NULL')]
  49.   private mixed $contact3;
  50.   #[ORM\ManyToOne(targetEntityOrganization::class, inversedBy'pages1')]
  51.   #[ORM\JoinColumn(onDelete'SET NULL')]
  52.   private mixed $organisation1;
  53.   #[ORM\ManyToOne(targetEntityOrganization::class, inversedBy'pages2')]
  54.   #[ORM\JoinColumn(onDelete'SET NULL')]
  55.   private mixed $organisation2;
  56.   #[ORM\ManyToOne(targetEntityOrganization::class, inversedBy'pages3')]
  57.   #[ORM\JoinColumn(onDelete'SET NULL')]
  58.   private mixed $organisation3;
  59.   #[ORM\ManyToOne(targetEntityPost::class, inversedBy'pages1')]
  60.   #[ORM\JoinColumn(onDelete'SET NULL')]
  61.   private mixed $related_post1;
  62.   #[ORM\ManyToOne(targetEntityPost::class, inversedBy'pages2')]
  63.   #[ORM\JoinColumn(onDelete'SET NULL')]
  64.   private mixed $related_post2;
  65.   #[ORM\ManyToOne(targetEntityPost::class, inversedBy'pages3')]
  66.   #[ORM\JoinColumn(onDelete'SET NULL')]
  67.   private mixed $related_post3;
  68.   #[ORM\Column(type'string'length255nullabletrue)]
  69.   private ?string $document_name1 null;
  70.   /**
  71.    * @Vich\UploadableField(mapping="documents", fileNameProperty="document_name1")
  72.    */
  73.   private ?File $document1 null;
  74.   #[ORM\Column(type'string'length255nullabletrue)]
  75.   private ?string $document_name2 null;
  76.   /**
  77.    * @Vich\UploadableField(mapping="documents", fileNameProperty="document_name2")
  78.    */
  79.   private ?File $document2 null;
  80.   #[ORM\Column(type'string'length255nullabletrue)]
  81.   private ?string $document_name3 null;
  82.   /**
  83.    * @Vich\UploadableField(mapping="documents", fileNameProperty="document_name3")
  84.    */
  85.   private ?File $document3 null;
  86.   #[ORM\Column(type'string'length255nullabletrue)]
  87.   private ?string $link1 null;
  88.   #[ORM\Column(type'string'length255nullabletrue)]
  89.   private ?string $url1 null;
  90.   #[ORM\Column(type'string'length255nullabletrue)]
  91.   private ?string $link2 null;
  92.   #[ORM\Column(type'string'length255nullabletrue)]
  93.   private ?string $url2 null;
  94.   #[ORM\Column(type'string'length255nullabletrue)]
  95.   private ?string $link3 null;
  96.   #[ORM\Column(type'string'length255nullabletrue)]
  97.   private ?string $url3 null;
  98.   #[ORM\Column(type'integer'nullabletrue)]
  99.   private ?int $ordre;
  100.   #[ORM\Column(type'boolean'nullabletrue)]
  101.   private ?bool $nordinfo false;
  102.   #[ORM\Column(type'boolean'nullabletrue)]
  103.   private ?bool $lenord false;
  104.   #[ORM\Column(type'string'length255nullabletrue)]
  105.   private ?string $alias_url null;
  106.   #[ORM\Column(type'string'length255nullabletrue)]
  107.   private ?string $url_icone null;
  108.   /**
  109.    * @Vich\UploadableField(mapping="url_icon_images", fileNameProperty="url_icone")
  110.    */
  111.   private ?File $urlIconFile null;
  112.   #[ORM\ManyToMany(targetEntityEpingle::class, mappedBy'visible_institutions')]
  113.   private mixed $epingles;
  114.   #[ORM\ManyToOne(targetEntityRssArticle::class, inversedBy'pages')]
  115.   private mixed $nordinfo_rss;
  116.   #[ORM\Column(type'boolean'nullabletrue)]
  117.   private ?bool $sommaire_affiche;
  118.   public function __construct()
  119.   {
  120.     $this->epingles = new ArrayCollection();
  121.   }
  122.   public function getId(): ?int
  123.   {
  124.     return $this->id;
  125.   }
  126.   public function setFile(File $file null): void
  127.   {
  128.     $this->file $file;
  129.     if ($file) {
  130.       $this->date_updated = new DateTime('now');
  131.     }
  132.   }
  133.   public function getFile(): mixed
  134.   {
  135.     return $this->file;
  136.   }
  137.   public function getFilename(): ?string
  138.   {
  139.     return $this->filename;
  140.   }
  141.   public function setFilename(string $filename null): mixed
  142.   {
  143.     $this->filename $filename;
  144.     return $this;
  145.   }
  146.   public function getTitre(): ?string
  147.   {
  148.     return $this->titre;
  149.   }
  150.   public function setTitre(?string $titre): self
  151.   {
  152.     $this->titre $titre;
  153.     return $this;
  154.   }
  155.   public function getMetaTitre(): ?string
  156.   {
  157.     return $this->meta_titre;
  158.   }
  159.   public function setMetaTitre(?string $meta_titre): self
  160.   {
  161.     $this->meta_titre $meta_titre;
  162.     return $this;
  163.   }
  164.   public function getMetaDescription(): ?string
  165.   {
  166.     return $this->meta_description;
  167.   }
  168.   public function setMetaDescription(?string $meta_description): self
  169.   {
  170.     $this->meta_description $meta_description;
  171.     return $this;
  172.   }
  173.   public function getContent(): ?string
  174.   {
  175.     return $this->content;
  176.   }
  177.   public function setContent(?string $content): self
  178.   {
  179.     $this->content $content;
  180.     return $this;
  181.   }
  182.   public function getActif(): ?bool
  183.   {
  184.     return $this->actif;
  185.   }
  186.   public function setActif(?bool $actif): self
  187.   {
  188.     $this->actif $actif;
  189.     return $this;
  190.   }
  191.   public function getCredits(): ?string
  192.   {
  193.     return $this->credits;
  194.   }
  195.   public function setCredits(?string $credits): self
  196.   {
  197.     $this->credits $credits;
  198.     return $this;
  199.   }
  200.   public function getContact1(): ?Contact
  201.   {
  202.     return $this->contact1;
  203.   }
  204.   public function setContact1(?Contact $contact1): self
  205.   {
  206.     $this->contact1 $contact1;
  207.     return $this;
  208.   }
  209.   public function getContact2(): ?Contact
  210.   {
  211.     return $this->contact2;
  212.   }
  213.   public function setContact2(?Contact $contact2): self
  214.   {
  215.     $this->contact2 $contact2;
  216.     return $this;
  217.   }
  218.   public function getContact3(): ?Contact
  219.   {
  220.     return $this->contact3;
  221.   }
  222.   public function setContact3(?Contact $contact3): self
  223.   {
  224.     $this->contact3 $contact3;
  225.     return $this;
  226.   }
  227.   public function getOrganisation1(): ?Organization
  228.   {
  229.     return $this->organisation1;
  230.   }
  231.   public function setOrganisation1(?Organization $organisation1): self
  232.   {
  233.     $this->organisation1 $organisation1;
  234.     return $this;
  235.   }
  236.   public function getOrganisation2(): ?Organization
  237.   {
  238.     return $this->organisation2;
  239.   }
  240.   public function setOrganisation2(?Organization $organisation2): self
  241.   {
  242.     $this->organisation2 $organisation2;
  243.     return $this;
  244.   }
  245.   public function getOrganisation3(): ?Organization
  246.   {
  247.     return $this->organisation3;
  248.   }
  249.   public function setOrganisation3(?Organization $organisation3): self
  250.   {
  251.     $this->organisation3 $organisation3;
  252.     return $this;
  253.   }
  254.   public function getRelatedPost1(): ?Post
  255.   {
  256.     return $this->related_post1;
  257.   }
  258.   public function setRelatedPost1(?Post $related_post1): self
  259.   {
  260.     $this->related_post1 $related_post1;
  261.     return $this;
  262.   }
  263.   public function getRelatedPost2(): ?Post
  264.   {
  265.     return $this->related_post2;
  266.   }
  267.   public function setRelatedPost2(?Post $related_post2): self
  268.   {
  269.     $this->related_post2 $related_post2;
  270.     return $this;
  271.   }
  272.   public function getRelatedPost3(): ?Post
  273.   {
  274.     return $this->related_post3;
  275.   }
  276.   public function setRelatedPost3(?Post $related_post3): self
  277.   {
  278.     $this->related_post3 $related_post3;
  279.     return $this;
  280.   }
  281.   public function getDocumentName1(): ?string
  282.   {
  283.     return $this->document_name1;
  284.   }
  285.   public function setDocumentName1(?string $document_name1): self
  286.   {
  287.     $this->document_name1 $document_name1;
  288.     return $this;
  289.   }
  290.   public function getDocumentName2(): ?string
  291.   {
  292.     return $this->document_name2;
  293.   }
  294.   public function setDocumentName2(?string $document_name2): self
  295.   {
  296.     $this->document_name2 $document_name2;
  297.     return $this;
  298.   }
  299.   public function getDocumentName3(): ?string
  300.   {
  301.     return $this->document_name3;
  302.   }
  303.   public function setDocumentName3(?string $document_name3): self
  304.   {
  305.     $this->document_name3 $document_name3;
  306.     return $this;
  307.   }
  308.   public function getLink1(): ?string
  309.   {
  310.     return $this->link1;
  311.   }
  312.   public function setLink1(?string $link1): self
  313.   {
  314.     $this->link1 $link1;
  315.     return $this;
  316.   }
  317.   public function getUrl1(): ?string
  318.   {
  319.     return $this->url1;
  320.   }
  321.   public function setUrl1(?string $url1): self
  322.   {
  323.     $this->url1 $url1;
  324.     return $this;
  325.   }
  326.   public function getLink2(): ?string
  327.   {
  328.     return $this->link2;
  329.   }
  330.   public function setLink2(?string $link2): self
  331.   {
  332.     $this->link2 $link2;
  333.     return $this;
  334.   }
  335.   public function getUrl2(): ?string
  336.   {
  337.     return $this->url2;
  338.   }
  339.   public function setUrl2(?string $url2): self
  340.   {
  341.     $this->url2 $url2;
  342.     return $this;
  343.   }
  344.   public function getLink3(): ?string
  345.   {
  346.     return $this->link3;
  347.   }
  348.   public function setLink3(?string $link3): self
  349.   {
  350.     $this->link3 $link3;
  351.     return $this;
  352.   }
  353.   public function getUrl3(): ?string
  354.   {
  355.     return $this->url3;
  356.   }
  357.   public function setUrl3(?string $url3): self
  358.   {
  359.     $this->url3 $url3;
  360.     return $this;
  361.   }
  362.   public function setDocument1(File $file null): void
  363.   {
  364.     $this->document1 $file;
  365.     if ($file) {
  366.       $this->date_updated = new DateTime('now');
  367.     }
  368.   }
  369.   public function getDocument1(): mixed
  370.   {
  371.     return $this->document1;
  372.   }
  373.   public function setDocument2(File $file null): void
  374.   {
  375.     $this->document2 $file;
  376.     if ($file) {
  377.       $this->date_updated = new DateTime('now');
  378.     }
  379.   }
  380.   public function getDocument2(): mixed
  381.   {
  382.     return $this->document2;
  383.   }
  384.   public function setDocument3(File $file null): void
  385.   {
  386.     $this->document3 $file;
  387.     if ($file) {
  388.       $this->date_updated = new DateTime('now');
  389.     }
  390.   }
  391.   public function getDocument3(): mixed
  392.   {
  393.     return $this->document3;
  394.   }
  395.   public function __toString(): string
  396.   {
  397.     return (string)$this->titre;
  398.   }
  399.   public function getOrdre(): ?int
  400.   {
  401.     return $this->ordre;
  402.   }
  403.   public function setOrdre(?int $ordre): self
  404.   {
  405.     $this->ordre $ordre;
  406.     return $this;
  407.   }
  408.   public function getNordinfo(): ?bool
  409.   {
  410.     return $this->nordinfo;
  411.   }
  412.   public function setNordinfo(?bool $nordinfo): self
  413.   {
  414.     $this->nordinfo $nordinfo;
  415.     return $this;
  416.   }
  417.   public function getLenord(): ?bool
  418.   {
  419.     return $this->lenord;
  420.   }
  421.   public function setLenord(?bool $lenord): self
  422.   {
  423.     $this->lenord $lenord;
  424.     return $this;
  425.   }
  426.   public function getAliasUrl(): ?string
  427.   {
  428.     return $this->alias_url;
  429.   }
  430.   public function setAliasUrl(?string $alias_url): self
  431.   {
  432.     $this->alias_url $alias_url;
  433.     return $this;
  434.   }
  435.   public function getUrlIcone(): ?string
  436.   {
  437.     return $this->url_icone;
  438.   }
  439.   public function setUrlIcone(?string $url_icone): self
  440.   {
  441.     $this->url_icone $url_icone;
  442.     return $this;
  443.   }
  444.   public function setUrlIconFile(?File $urlIconFile null): void
  445.   {
  446.     $this->urlIconFile $urlIconFile;
  447.     if ($urlIconFile) {
  448.       $this->date_updated = new DateTime('now');
  449.     }
  450.   }
  451.   public function getUrlIconFile(): ?File
  452.   {
  453.     return $this->urlIconFile;
  454.   }
  455.   /**
  456.    * @return Collection
  457.    */
  458.   public function getEpingles(): Collection
  459.   {
  460.     return $this->epingles;
  461.   }
  462.   public function addEpingle(Epingle $epingle): self
  463.   {
  464.     if (!$this->epingles->contains($epingle)) {
  465.       $this->epingles[] = $epingle;
  466.       $epingle->addVisibleInstitution($this);
  467.     }
  468.     return $this;
  469.   }
  470.   public function removeEpingle(Epingle $epingle): self
  471.   {
  472.     if ($this->epingles->removeElement($epingle)) {
  473.       $epingle->removeVisibleInstitution($this);
  474.     }
  475.     return $this;
  476.   }
  477.   public function getNordinfoRss(): ?RssArticle
  478.   {
  479.     return $this->nordinfo_rss;
  480.   }
  481.   public function setNordinfoRss(?RssArticle $nordinfo_rss): self
  482.   {
  483.     $this->nordinfo_rss $nordinfo_rss;
  484.     return $this;
  485.   }
  486.   public function getSommaireAffiche(): ?bool
  487.   {
  488.     return $this->sommaire_affiche;
  489.   }
  490.   public function setSommaireAffiche(?bool $sommaire_affiche): self
  491.   {
  492.     $this->sommaire_affiche $sommaire_affiche;
  493.     return $this;
  494.   }
  495. }