<?php
namespace App\Entity;
use App\Repository\ParametersRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
#[ORM\Entity(repositoryClass: ParametersRepository::class)]
class Parameters
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\OneToOne(targetEntity: AccountingFirm::class, inversedBy: 'parameters', cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(nullable: false)]
private $accountingFirm;
#[ORM\Column(type: 'array')]
private $modules = [
'Newsletter' => false,
'Actualites' => false,
'Actualite_a_la_une' => false,
'Annonces' => false,
'Livre_blanc' => false,
'Liens_utils' => false,
'Actualite_du_mois' => false,
'Tools' => false,
'Partners' => false,
'Actu_rs' => false,
'OnePage' => false,
'Contact' => false,
'Contact_profession' => false,
'Contact_etreRappele' => false,
'Contact_custom' => false,
'Inscription_newsletter' => false,
'Creation_entreprise' => false,
'Factures' => false,
'Animation' => false,
'Diaporama' => false,
'Module_video' => false,
];
#[ORM\Column(type: 'integer', options: ['default' => 0])]
private $websiteNewsLinks = 0;
#[ORM\Column(type: 'integer', options: ['default' => 0])]
private $websiteNewsImages = 0;
#[ORM\Column(type: 'integer', options: ['default' => 0])]
private $websiteNewsDocuments = 0;
#[ORM\Column(type: 'string', length: 255, options: ['default' => '200k'])]
private $websiteNewsMaxImageSize = "200k";
#[ORM\Column(type: 'string', length: 255, options: ['default' => '200k'])]
private $websiteNewsMaxDocumentSize = "200k";
#[ORM\Column(type: 'string', options: ['default' => '200k'])]
private $ebookMaxImageSize = "200k";
#[ORM\Column(type: 'string', options: ['default' => '200k'])]
private $ebookMaxDocumentSize = "200k";
#[ORM\Column(type: 'integer', options: ['default' => 0])]
private $ebookDocuments = 0;
#[ORM\Column(type: 'integer', options: ['default' => 0])]
private $ebookImages = 0;
#[ORM\OneToMany(targetEntity: Page::class, mappedBy: 'parameter', orphanRemoval: true, cascade: ['persist', 'remove'])]
private $pages;
#[ORM\Column(type: 'text', nullable: true)]
private $webMail;
#[ORM\Column(type: 'text', nullable: true)]
private $googleTagManager;
#[ORM\Column(type: 'text', nullable: true)]
private $googleAnalytics;
#[ORM\Column(type: 'string', length: 255)]
private $domainType = '';
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $seo_meta_title;
#[ORM\Column(type: 'string', length: 1000, nullable: true)]
private $seo_meta_description;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $GOOGLE_RECAPTCHA_SITE_KEY;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $GOOGLE_RECAPTCHA_SECRET;
#[ORM\OneToMany(targetEntity: SeoPageClient::class, mappedBy: 'parameter_id', orphanRemoval: true)]
private $seopages;
#[ORM\Column(type: 'string', length: 300, nullable: true)]
private $favicon;
#[ORM\OneToMany(targetEntity: RedirectionClient::class, mappedBy: 'parameter', orphanRemoval: true, cascade: ['persist', 'remove'])]
private $redirections;
#[ORM\OneToMany(targetEntity: Alias::class, mappedBy: 'parameter', orphanRemoval: true, cascade: ['persist', 'remove'])]
private $aliases;
#[ORM\ManyToOne(targetEntity: MailjetApi::class, inversedBy: 'parameters')]
private $mailjetapi;
#[ORM\Column(type: 'text', nullable: true)]
private $webMailRecrutement;
#[ORM\ManyToOne(targetEntity: MailjetApi::class, inversedBy: 'parametersRecrutement')]
private $mailjetapiRecrutement;
#[ORM\Column(type: 'boolean', options: ['default' => false])]
private bool $maintenance = false;
#[ORM\Column(type: 'boolean', options: ['default' => false])]
private bool $construction = false;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $moneticoTpe;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $moneticoSociete;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $moneticoCle;
public function __construct()
{
$this->pages = new ArrayCollection();
$this->seopages = new ArrayCollection();
$this->redirections = new ArrayCollection();
$this->aliases = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getAccountingFirm(): ?AccountingFirm
{
return $this->accountingFirm;
}
public function setAccountingFirm(AccountingFirm $accountingFirm): self
{
$this->accountingFirm = $accountingFirm;
return $this;
}
public function getModules(): ?array
{
return $this->modules;
}
public function setModules(array $modules): self
{
$this->modules = $modules;
return $this;
}
public function getWebsiteNewsLinks(): ?int
{
return $this->websiteNewsLinks;
}
public function setWebsiteNewsLinks(int $websiteNewsLinks): self
{
$this->websiteNewsLinks = $websiteNewsLinks;
return $this;
}
public function getWebsiteNewsImages(): ?int
{
return $this->websiteNewsImages;
}
public function setWebsiteNewsImages(int $websiteNewsImages): self
{
$this->websiteNewsImages = $websiteNewsImages;
return $this;
}
public function getWebsiteNewsDocuments(): ?int
{
return $this->websiteNewsDocuments;
}
public function setWebsiteNewsDocuments(int $websiteNewsDocuments): self
{
$this->websiteNewsDocuments = $websiteNewsDocuments;
return $this;
}
public function getWebsiteNewsMaxImageSize(): string
{
return $this->websiteNewsMaxImageSize ? $this->websiteNewsMaxImageSize : '200k';
}
public function setWebsiteNewsMaxImageSize(string $websiteNewsMaxImageSize): self
{
$this->websiteNewsMaxImageSize = $websiteNewsMaxImageSize;
return $this;
}
public function getWebsiteNewsMaxDocumentSize(): string
{
return $this->websiteNewsMaxDocumentSize ? $this->websiteNewsMaxDocumentSize : '200k';
}
public function setWebsiteNewsMaxDocumentSize(string $websiteNewsMaxDocumentSize): self
{
$this->websiteNewsMaxDocumentSize = $websiteNewsMaxDocumentSize;
return $this;
}
public function getEbookMaxImageSize(): ?string
{
return $this->ebookMaxImageSize;
}
public function setEbookMaxImageSize(string $ebookMaxImageSize): self
{
$this->ebookMaxImageSize = $ebookMaxImageSize;
return $this;
}
public function getEbookMaxDocumentSize(): ?string
{
return $this->ebookMaxDocumentSize;
}
public function setEbookMaxDocumentSize(string $ebookMaxDocumentSize): self
{
$this->ebookMaxDocumentSize = $ebookMaxDocumentSize;
return $this;
}
public function getEbookDocuments(): ?int
{
return $this->ebookDocuments;
}
public function setEbookDocuments(int $ebookDocuments): self
{
$this->ebookDocuments = $ebookDocuments;
return $this;
}
public function getEbookImages(): ?int
{
return $this->ebookImages;
}
public function setEbookImages(int $ebookImages): self
{
$this->ebookImages = $ebookImages;
return $this;
}
/**
* @return Collection|Page[]
*/
public function getPages(): Collection
{
return $this->pages;
}
public function addPage(Page $page): self
{
if (!$this->pages->contains($page)) {
$this->pages[] = $page;
$page->setParameter($this);
}
return $this;
}
public function removePage(Page $page): self
{
if ($this->pages->removeElement($page)) {
// set the owning side to null (unless already changed)
if ($page->getParameter() === $this) {
$page->setParameter(null);
}
}
return $this;
}
public function addRedirection(RedirectionClient $redirection): self
{
if (!$this->redirections->contains($redirection)) {
$this->redirections[] = $redirection;
$redirection->setParameter($this);
}
return $this;
}
public function removeRedirection(RedirectionClient $redirection): self
{
if ($this->redirections->removeElement($redirection)) {
// set the owning side to null (unless already changed)
if ($redirection->getParameter() === $this) {
$redirection->setParameter(null);
}
}
return $this;
}
public function getWebMail(): ?string
{
return $this->webMail;
}
public function setWebMail(?string $webMail): self
{
$this->webMail = $webMail;
return $this;
}
public function getGoogleTagManager(): ?string
{
return $this->googleTagManager;
}
public function setGoogleTagManager(?string $googleTagManager): self
{
$this->googleTagManager = $googleTagManager;
return $this;
}
public function getGoogleAnalytics(): ?string
{
return $this->googleAnalytics;
}
public function setGoogleAnalytics(?string $googleAnalytics): self
{
$this->googleAnalytics = $googleAnalytics;
return $this;
}
public function getSeoMetaTitle(): ?string
{
return $this->seo_meta_title;
}
public function setSeoMetaTitle(?string $seo_meta_title): self
{
$this->seo_meta_title = $seo_meta_title;
return $this;
}
public function getSeoMetaDescription(): ?string
{
return $this->seo_meta_description;
}
public function setSeoMetaDescription(?string $seo_meta_description): self
{
$this->seo_meta_description = $seo_meta_description;
return $this;
}
public function getGOOGLERECAPTCHASITEKEY(): ?string
{
return $this->GOOGLE_RECAPTCHA_SITE_KEY;
}
public function setGOOGLERECAPTCHASITEKEY(?string $GOOGLE_RECAPTCHA_SITE_KEY): self
{
$this->GOOGLE_RECAPTCHA_SITE_KEY = $GOOGLE_RECAPTCHA_SITE_KEY;
return $this;
}
public function getGOOGLERECAPTCHASECRET(): ?string
{
return $this->GOOGLE_RECAPTCHA_SECRET;
}
public function setGOOGLERECAPTCHASECRET(?string $GOOGLE_RECAPTCHA_SECRET): self
{
$this->GOOGLE_RECAPTCHA_SECRET = $GOOGLE_RECAPTCHA_SECRET;
return $this;
}
/**
* @return Collection|SeoPageClient[]
*/
public function getSeopages(): Collection
{
return $this->seopages;
}
public function getDomainType(): string
{
return $this->domainType;
}
public function setDomainType(string $domainType): self
{
$this->domainType = $domainType;
return $this;
}
public function addSeopage(SeoPageClient $seopage): self
{
if (!$this->seopages->contains($seopage)) {
$this->seopages[] = $seopage;
$seopage->setParameterId($this);
}
return $this;
}
public function removeSeopage(SeoPageClient $seopage): self
{
if ($this->seopages->removeElement($seopage)) {
// set the owning side to null (unless already changed)
if ($seopage->getParameterId() === $this) {
$seopage->setParameterId(null);
}
}
return $this;
}
public function getFavicon(): ?string
{
return $this->favicon;
}
public function setFavicon(?string $favicon): self
{
$this->favicon = $favicon;
return $this;
}
/* public function setTmpFavicon(?File $tmpFavicon = null): void
{
$this->tmpFavicon = $tmpFavicon;
}
public function getTmpFavicon() : ?File
{
return $this->tmpFavicon;
}
*/
public function getUploadPath(): ?string
{
return 'clients/' . $this->accountingFirm->getHost() . '/assets/images/';
}
public function getUploadPathFiles(): ?string
{
return 'clients/' . $this->accountingFirm->getHost() . '/assets/';
}
public function getFaviconPath()
{
return $this->accountingFirm->getHost() . '/assets/images/' . $this->getFavicon();
}
/**
* @return Collection|RedirectionClient[]
*/
public function getRedirections(): ?collection
{
return $this->redirections;
}
/**
* @return Collection|Alias[]
*/
public function getAliases(): Collection
{
return $this->aliases;
}
public function addAlias(Alias $alias): self
{
if (!$this->aliases->contains($alias)) {
$this->aliases[] = $alias;
$alias->setParameter($this);
}
return $this;
}
public function removeAlias(Alias $alias): self
{
if ($this->aliases->removeElement($alias)) {
// set the owning side to null (unless already changed)
if ($alias->getParameter() === $this) {
$alias->setParameter(null);
}
}
return $this;
}
public function getMailjetapi(): ?MailjetApi
{
return $this->mailjetapi;
}
public function setMailjetapi(?MailjetApi $mailjetapi): self
{
$this->mailjetapi = $mailjetapi;
return $this;
}
public function getWebMailRecrutement(): ?string
{
return $this->webMailRecrutement;
}
public function setWebMailRecrutement(?string $webMailRecrutement): self
{
$this->webMailRecrutement = $webMailRecrutement;
return $this;
}
public function getMailjetapiRecrutement(): ?MailjetApi
{
return $this->mailjetapiRecrutement;
}
public function setMailjetapiRecrutement(?MailjetApi $mailjetapiRecrutement): self
{
$this->mailjetapiRecrutement = $mailjetapiRecrutement;
return $this;
}
public function isMaintenance(): bool
{
return $this->maintenance;
}
public function setMaintenance(bool $maintenance): self
{
$this->maintenance = $maintenance;
return $this;
}
public function isConstruction(): bool
{
return $this->construction;
}
public function setConstruction(bool $construction): self
{
$this->construction = $construction;
return $this;
}
public function getMoneticoTpe(): ?string
{
return $this->moneticoTpe;
}
public function setMoneticoTpe(?string $moneticoTpe): self
{
$this->moneticoTpe = $moneticoTpe;
return $this;
}
public function getMoneticoSociete(): ?string
{
return $this->moneticoSociete;
}
public function setMoneticoSociete(?string $moneticoSociete): self
{
$this->moneticoSociete = $moneticoSociete;
return $this;
}
public function getMoneticoCle(): ?string
{
return $this->moneticoCle;
}
public function setMoneticoCle(?string $moneticoCle): self
{
$this->moneticoCle = $moneticoCle;
return $this;
}
}