src/Entity/Parameters.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParametersRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. #[ORM\Entity(repositoryClassParametersRepository::class)]
  9. class Parameters
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\OneToOne(targetEntityAccountingFirm::class, inversedBy'parameters'cascade: ['persist''remove'])]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private $accountingFirm;
  18.     #[ORM\Column(type'array')]
  19.     private $modules = [
  20.         'Newsletter' => false,
  21.         'Actualites' => false,
  22.         'Actualite_a_la_une' => false,
  23.         'Annonces' => false,
  24.         'Livre_blanc' => false,
  25.         'Liens_utils' => false,
  26.         'Actualite_du_mois' => false,
  27.         'Tools' => false,
  28.         'Partners' => false,
  29.         'Actu_rs' => false,
  30.         'OnePage' => false,
  31.         'Contact' => false,
  32.         'Contact_profession' => false,
  33.         'Contact_etreRappele' => false,
  34.         'Contact_custom' => false,
  35.         'Inscription_newsletter' => false,
  36.         'Creation_entreprise' => false,
  37.         'Factures' => false,
  38.         'Animation' => false,
  39.         'Diaporama' => false,
  40.         'Module_video' => false,
  41.     ];
  42.     #[ORM\Column(type'integer'options: ['default' => 0])]
  43.     private $websiteNewsLinks 0;
  44.     #[ORM\Column(type'integer'options: ['default' => 0])]
  45.     private $websiteNewsImages 0;
  46.     #[ORM\Column(type'integer'options: ['default' => 0])]
  47.     private $websiteNewsDocuments 0;
  48.     #[ORM\Column(type'string'length255options: ['default' => '200k'])]
  49.     private $websiteNewsMaxImageSize "200k";
  50.     #[ORM\Column(type'string'length255options: ['default' => '200k'])]
  51.     private $websiteNewsMaxDocumentSize "200k";
  52.     #[ORM\Column(type'string'options: ['default' => '200k'])]
  53.     private $ebookMaxImageSize "200k";
  54.     #[ORM\Column(type'string'options: ['default' => '200k'])]
  55.     private $ebookMaxDocumentSize "200k";
  56.     #[ORM\Column(type'integer'options: ['default' => 0])]
  57.     private $ebookDocuments 0;
  58.     #[ORM\Column(type'integer'options: ['default' => 0])]
  59.     private $ebookImages 0;
  60.     #[ORM\OneToMany(targetEntityPage::class, mappedBy'parameter'orphanRemovaltruecascade: ['persist''remove'])]
  61.     private $pages;
  62.     #[ORM\Column(type'text'nullabletrue)]
  63.     private $webMail;
  64.     #[ORM\Column(type'text'nullabletrue)]
  65.     private $googleTagManager;
  66.     #[ORM\Column(type'text'nullabletrue)]
  67.     private $googleAnalytics;
  68.     #[ORM\Column(type'string'length255)]
  69.     private $domainType '';
  70.     #[ORM\Column(type'string'length255nullabletrue)]
  71.     private $seo_meta_title;
  72.     #[ORM\Column(type'string'length1000nullabletrue)]
  73.     private $seo_meta_description;
  74.     #[ORM\Column(type'string'length255nullabletrue)]
  75.     private $GOOGLE_RECAPTCHA_SITE_KEY;
  76.     #[ORM\Column(type'string'length255nullabletrue)]
  77.     private $GOOGLE_RECAPTCHA_SECRET;
  78.     #[ORM\OneToMany(targetEntitySeoPageClient::class, mappedBy'parameter_id'orphanRemovaltrue)]
  79.     private $seopages;
  80.     #[ORM\Column(type'string'length300nullabletrue)]
  81.     private $favicon;
  82.     #[ORM\OneToMany(targetEntityRedirectionClient::class, mappedBy'parameter'orphanRemovaltruecascade: ['persist''remove'])]
  83.     private $redirections;
  84.     #[ORM\OneToMany(targetEntityAlias::class, mappedBy'parameter'orphanRemovaltruecascade: ['persist''remove'])]
  85.     private $aliases;
  86.     #[ORM\ManyToOne(targetEntityMailjetApi::class, inversedBy'parameters')]
  87.     private $mailjetapi;
  88.     #[ORM\Column(type'text'nullabletrue)]
  89.     private $webMailRecrutement;
  90.     #[ORM\ManyToOne(targetEntityMailjetApi::class, inversedBy'parametersRecrutement')]
  91.     private $mailjetapiRecrutement;
  92.     #[ORM\Column(type'boolean'options: ['default' => false])]
  93.     private bool $maintenance false;
  94.     #[ORM\Column(type'boolean'options: ['default' => false])]
  95.     private bool $construction false;
  96.     #[ORM\Column(type'string'length255nullabletrue)]
  97.     private $moneticoTpe;
  98.     #[ORM\Column(type'string'length255nullabletrue)]
  99.     private $moneticoSociete;
  100.     #[ORM\Column(type'string'length255nullabletrue)]
  101.     private $moneticoCle;
  102.     public function __construct()
  103.     {
  104.         $this->pages = new ArrayCollection();
  105.         $this->seopages = new ArrayCollection();
  106.         $this->redirections = new ArrayCollection();
  107.         $this->aliases = new ArrayCollection();
  108.     }
  109.     public function getId(): ?int
  110.     {
  111.         return $this->id;
  112.     }
  113.     public function getAccountingFirm(): ?AccountingFirm
  114.     {
  115.         return $this->accountingFirm;
  116.     }
  117.     public function setAccountingFirm(AccountingFirm $accountingFirm): self
  118.     {
  119.         $this->accountingFirm $accountingFirm;
  120.         return $this;
  121.     }
  122.     public function getModules(): ?array
  123.     {
  124.         return $this->modules;
  125.     }
  126.     public function setModules(array $modules): self
  127.     {
  128.         $this->modules $modules;
  129.         return $this;
  130.     }
  131.     public function getWebsiteNewsLinks(): ?int
  132.     {
  133.         return $this->websiteNewsLinks;
  134.     }
  135.     public function setWebsiteNewsLinks(int $websiteNewsLinks): self
  136.     {
  137.         $this->websiteNewsLinks $websiteNewsLinks;
  138.         return $this;
  139.     }
  140.     public function getWebsiteNewsImages(): ?int
  141.     {
  142.         return $this->websiteNewsImages;
  143.     }
  144.     public function setWebsiteNewsImages(int $websiteNewsImages): self
  145.     {
  146.         $this->websiteNewsImages $websiteNewsImages;
  147.         return $this;
  148.     }
  149.     public function getWebsiteNewsDocuments(): ?int
  150.     {
  151.         return $this->websiteNewsDocuments;
  152.     }
  153.     public function setWebsiteNewsDocuments(int $websiteNewsDocuments): self
  154.     {
  155.         $this->websiteNewsDocuments $websiteNewsDocuments;
  156.         return $this;
  157.     }
  158.     public function getWebsiteNewsMaxImageSize(): string
  159.     {
  160.         return $this->websiteNewsMaxImageSize $this->websiteNewsMaxImageSize '200k';
  161.     }
  162.     public function setWebsiteNewsMaxImageSize(string $websiteNewsMaxImageSize): self
  163.     {
  164.         $this->websiteNewsMaxImageSize $websiteNewsMaxImageSize;
  165.         return $this;
  166.     }
  167.     public function getWebsiteNewsMaxDocumentSize(): string
  168.     {
  169.         return $this->websiteNewsMaxDocumentSize $this->websiteNewsMaxDocumentSize '200k';
  170.     }
  171.     public function setWebsiteNewsMaxDocumentSize(string $websiteNewsMaxDocumentSize): self
  172.     {
  173.         $this->websiteNewsMaxDocumentSize $websiteNewsMaxDocumentSize;
  174.         return $this;
  175.     }
  176.     public function getEbookMaxImageSize(): ?string
  177.     {
  178.         return $this->ebookMaxImageSize;
  179.     }
  180.     public function setEbookMaxImageSize(string $ebookMaxImageSize): self
  181.     {
  182.         $this->ebookMaxImageSize $ebookMaxImageSize;
  183.         return $this;
  184.     }
  185.     public function getEbookMaxDocumentSize(): ?string
  186.     {
  187.         return $this->ebookMaxDocumentSize;
  188.     }
  189.     public function setEbookMaxDocumentSize(string $ebookMaxDocumentSize): self
  190.     {
  191.         $this->ebookMaxDocumentSize $ebookMaxDocumentSize;
  192.         return $this;
  193.     }
  194.     public function getEbookDocuments(): ?int
  195.     {
  196.         return $this->ebookDocuments;
  197.     }
  198.     public function setEbookDocuments(int $ebookDocuments): self
  199.     {
  200.         $this->ebookDocuments $ebookDocuments;
  201.         return $this;
  202.     }
  203.     public function getEbookImages(): ?int
  204.     {
  205.         return $this->ebookImages;
  206.     }
  207.     public function setEbookImages(int $ebookImages): self
  208.     {
  209.         $this->ebookImages $ebookImages;
  210.         return $this;
  211.     }
  212.     /**
  213.      * @return Collection|Page[]
  214.      */
  215.     public function getPages(): Collection
  216.     {
  217.         return $this->pages;
  218.     }
  219.     public function addPage(Page $page): self
  220.     {
  221.         if (!$this->pages->contains($page)) {
  222.             $this->pages[] = $page;
  223.             $page->setParameter($this);
  224.         }
  225.         return $this;
  226.     }
  227.     public function removePage(Page $page): self
  228.     {
  229.         if ($this->pages->removeElement($page)) {
  230.             // set the owning side to null (unless already changed)
  231.             if ($page->getParameter() === $this) {
  232.                 $page->setParameter(null);
  233.             }
  234.         }
  235.         return $this;
  236.     }
  237.     public function addRedirection(RedirectionClient $redirection): self
  238.     {
  239.         if (!$this->redirections->contains($redirection)) {
  240.             $this->redirections[] = $redirection;
  241.             $redirection->setParameter($this);
  242.         }
  243.         return $this;
  244.     }
  245.     public function removeRedirection(RedirectionClient $redirection): self
  246.     {
  247.         if ($this->redirections->removeElement($redirection)) {
  248.             // set the owning side to null (unless already changed)
  249.             if ($redirection->getParameter() === $this) {
  250.                 $redirection->setParameter(null);
  251.             }
  252.         }
  253.         return $this;
  254.     }
  255.     public function getWebMail(): ?string
  256.     {
  257.         return $this->webMail;
  258.     }
  259.     public function setWebMail(?string $webMail): self
  260.     {
  261.         $this->webMail $webMail;
  262.         return $this;
  263.     }
  264.     public function getGoogleTagManager(): ?string
  265.     {
  266.         return $this->googleTagManager;
  267.     }
  268.     public function setGoogleTagManager(?string $googleTagManager): self
  269.     {
  270.         $this->googleTagManager $googleTagManager;
  271.         return $this;
  272.     }
  273.     public function getGoogleAnalytics(): ?string
  274.     {
  275.         return $this->googleAnalytics;
  276.     }
  277.     public function setGoogleAnalytics(?string $googleAnalytics): self
  278.     {
  279.         $this->googleAnalytics $googleAnalytics;
  280.         return $this;
  281.     }
  282.     public function getSeoMetaTitle(): ?string
  283.     {
  284.         return $this->seo_meta_title;
  285.     }
  286.     public function setSeoMetaTitle(?string $seo_meta_title): self
  287.     {
  288.         $this->seo_meta_title $seo_meta_title;
  289.         return $this;
  290.     }
  291.     public function getSeoMetaDescription(): ?string
  292.     {
  293.         return $this->seo_meta_description;
  294.     }
  295.     public function setSeoMetaDescription(?string $seo_meta_description): self
  296.     {
  297.         $this->seo_meta_description $seo_meta_description;
  298.         return $this;
  299.     }
  300.     public function getGOOGLERECAPTCHASITEKEY(): ?string
  301.     {
  302.         return $this->GOOGLE_RECAPTCHA_SITE_KEY;
  303.     }
  304.     public function setGOOGLERECAPTCHASITEKEY(?string $GOOGLE_RECAPTCHA_SITE_KEY): self
  305.     {
  306.         $this->GOOGLE_RECAPTCHA_SITE_KEY $GOOGLE_RECAPTCHA_SITE_KEY;
  307.         return $this;
  308.     }
  309.     public function getGOOGLERECAPTCHASECRET(): ?string
  310.     {
  311.         return $this->GOOGLE_RECAPTCHA_SECRET;
  312.     }
  313.     public function setGOOGLERECAPTCHASECRET(?string $GOOGLE_RECAPTCHA_SECRET): self
  314.     {
  315.         $this->GOOGLE_RECAPTCHA_SECRET $GOOGLE_RECAPTCHA_SECRET;
  316.         return $this;
  317.     }
  318.     /**
  319.      * @return Collection|SeoPageClient[]
  320.      */
  321.     public function getSeopages(): Collection
  322.     {
  323.         return $this->seopages;
  324.     }
  325.     public function getDomainType(): string
  326.     {
  327.         return $this->domainType;
  328.     }
  329.     public function setDomainType(string $domainType): self
  330.     {
  331.         $this->domainType $domainType;
  332.         return $this;
  333.     }
  334.     public function addSeopage(SeoPageClient $seopage): self
  335.     {
  336.         if (!$this->seopages->contains($seopage)) {
  337.             $this->seopages[] = $seopage;
  338.             $seopage->setParameterId($this);
  339.         }
  340.         return $this;
  341.     }
  342.     public function removeSeopage(SeoPageClient $seopage): self
  343.     {
  344.         if ($this->seopages->removeElement($seopage)) {
  345.             // set the owning side to null (unless already changed)
  346.             if ($seopage->getParameterId() === $this) {
  347.                 $seopage->setParameterId(null);
  348.             }
  349.         }
  350.         return $this;
  351.     }
  352.     public function getFavicon(): ?string
  353.     {
  354.         return $this->favicon;
  355.     }
  356.     public function setFavicon(?string $favicon): self
  357.     {
  358.         $this->favicon $favicon;
  359.         return $this;
  360.     }
  361.     /*   public function setTmpFavicon(?File $tmpFavicon = null): void
  362.     {
  363.         $this->tmpFavicon = $tmpFavicon;
  364.     }
  365.     public function getTmpFavicon() : ?File
  366.     {
  367.         return $this->tmpFavicon;
  368.     }
  369. */
  370.     public function getUploadPath(): ?string
  371.     {
  372.         return 'clients/' $this->accountingFirm->getHost() . '/assets/images/';
  373.     }
  374.     public function getUploadPathFiles(): ?string
  375.     {
  376.         return 'clients/' $this->accountingFirm->getHost() . '/assets/';
  377.     }
  378.     public function getFaviconPath()
  379.     {
  380.         return $this->accountingFirm->getHost() . '/assets/images/' $this->getFavicon();
  381.     }
  382.     /**
  383.      * @return Collection|RedirectionClient[]
  384.      */
  385.     public function getRedirections(): ?collection
  386.     {
  387.         return $this->redirections;
  388.     }
  389.     /**
  390.      * @return Collection|Alias[]
  391.      */
  392.     public function getAliases(): Collection
  393.     {
  394.         return $this->aliases;
  395.     }
  396.     public function addAlias(Alias $alias): self
  397.     {
  398.         if (!$this->aliases->contains($alias)) {
  399.             $this->aliases[] = $alias;
  400.             $alias->setParameter($this);
  401.         }
  402.         return $this;
  403.     }
  404.     public function removeAlias(Alias $alias): self
  405.     {
  406.         if ($this->aliases->removeElement($alias)) {
  407.             // set the owning side to null (unless already changed)
  408.             if ($alias->getParameter() === $this) {
  409.                 $alias->setParameter(null);
  410.             }
  411.         }
  412.         return $this;
  413.     }
  414.     public function getMailjetapi(): ?MailjetApi
  415.     {
  416.         return $this->mailjetapi;
  417.     }
  418.     public function setMailjetapi(?MailjetApi $mailjetapi): self
  419.     {
  420.         $this->mailjetapi $mailjetapi;
  421.         return $this;
  422.     }
  423.     public function getWebMailRecrutement(): ?string
  424.     {
  425.         return $this->webMailRecrutement;
  426.     }
  427.     public function setWebMailRecrutement(?string $webMailRecrutement): self
  428.     {
  429.         $this->webMailRecrutement $webMailRecrutement;
  430.         return $this;
  431.     }
  432.     public function getMailjetapiRecrutement(): ?MailjetApi
  433.     {
  434.         return $this->mailjetapiRecrutement;
  435.     }
  436.     public function setMailjetapiRecrutement(?MailjetApi $mailjetapiRecrutement): self
  437.     {
  438.         $this->mailjetapiRecrutement $mailjetapiRecrutement;
  439.         return $this;
  440.     }
  441.     public function isMaintenance(): bool
  442.     {
  443.         return $this->maintenance;
  444.     }
  445.     public function setMaintenance(bool $maintenance): self
  446.     {
  447.         $this->maintenance $maintenance;
  448.         return $this;
  449.     }
  450.     public function isConstruction(): bool
  451.     {
  452.         return $this->construction;
  453.     }
  454.     public function setConstruction(bool $construction): self
  455.     {
  456.         $this->construction $construction;
  457.         return $this;
  458.     }
  459.     public function getMoneticoTpe(): ?string
  460.     {
  461.         return $this->moneticoTpe;
  462.     }
  463.     public function setMoneticoTpe(?string $moneticoTpe): self
  464.     {
  465.         $this->moneticoTpe $moneticoTpe;
  466.         return $this;
  467.     }
  468.     public function getMoneticoSociete(): ?string
  469.     {
  470.         return $this->moneticoSociete;
  471.     }
  472.     public function setMoneticoSociete(?string $moneticoSociete): self
  473.     {
  474.         $this->moneticoSociete $moneticoSociete;
  475.         return $this;
  476.     }
  477.     public function getMoneticoCle(): ?string
  478.     {
  479.         return $this->moneticoCle;
  480.     }
  481.     public function setMoneticoCle(?string $moneticoCle): self
  482.     {
  483.         $this->moneticoCle $moneticoCle;
  484.         return $this;
  485.     }
  486. }