src/Entity/Settings.php line 20
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Flexy\ShopBundle\Entity\Taxes\ValueAddedTax;
use App\Repository\SettingsRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Translatable\Translatable;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: SettingsRepository::class)]
#[ApiResource(
normalizationContext: ['groups' => ['read']],
denormalizationContext: ['groups' => ['write']],
)]
class Settings implements Translatable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isMonday = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isTuesday = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isWednesday = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isThursday = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isFriday = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isSaturday = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isSunday = null;
#[ORM\Column(type: 'time', nullable: true)]
private ?\DateTimeInterface $startWorkAt = null;
#[ORM\Column(type: 'time', nullable: true)]
private ?\DateTimeInterface $endWorkAt = null;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $excludeDays = [];
#[ORM\Column(type: 'json', nullable: true)]
private ?array $excludeDates = [];
#[ORM\Column(type: 'json', nullable: true)]
private ?array $excludeHours = [];
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $logo = "";
#[ORM\Column(type: 'text', nullable: true)]
private $logoBase64 = "";
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $favicon = "";
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[Assert\Email]
private $email = "contact@yourdomain.com";
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $address = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $currency = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $defaultLang = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $projectName = null;
#[ORM\Column(length: 255, nullable: true,unique:true)]
private ?string $code = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $assetFolderName = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $mailOrderCreatedBody = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mailOrderCreatedTitle = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prefixOrder = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $rootUrl = null;
#[ORM\ManyToOne(inversedBy: 'settings')]
private ?FrontTheme $frontTheme = null;
#[Gedmo\Translatable]
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(nullable: true)]
private ?bool $isMercureEnabled = null;
#[ORM\Column(nullable: true)]
private ?bool $vatIncludedInOrders = null;
#[ORM\Column(nullable: true)]
private ?bool $vatDisplayedInOrders = null;
#[ORM\ManyToOne]
private ?ValueAddedTax $defaultValueAddedTax = null;
#[ORM\Column(nullable: true)]
private ?bool $sideBarMinimized = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mobileAppScheme = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mobileAppSchemeDev = null;
#[ORM\Column(nullable: true)]
private ?bool $developpementEnv = null;
#[ORM\Column(length: 255,nullable: true)]
private ?string $mobileAppSchemeIOS = null;
#[ORM\Column(length: 255,nullable: true)]
private ?string $mobileAppSchemeAndroid = null;
#[ORM\ManyToOne(inversedBy: 'settings')]
private ?WebsiteTheme $websiteTheme = null;
#[Gedmo\Translatable]
#[Groups(['read','write'])]
#[ORM\Column(length: 255, nullable: true)]
private ?string $title = null;
/**
* Used locale to override Translation listener`s locale
* this is not a mapped field of entity metadata, just a simple property
*/
#[Gedmo\Locale]
private $locale;
#[ORM\Column(length: 255, nullable: true)]
private ?string $orderPrefix = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $invoicePrefix = null;
#[ORM\Column(nullable: true)]
private ?bool $isGeoLocalisationApiEnabled = null;
#[ORM\Column(nullable: true)]
private ?bool $isWebSocketNotificationEnabled = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $absoluteUrl = null;
public function getId(): ?int
{
return $this->id;
}
public function getIsMonday(): ?bool
{
return $this->isMonday;
}
public function setIsMonday(?bool $isMonday): self
{
$this->isMonday = $isMonday;
return $this;
}
public function getIsTuesday(): ?bool
{
return $this->isTuesday;
}
public function setIsTuesday(?bool $isTuesday): self
{
$this->isTuesday = $isTuesday;
return $this;
}
public function getIsWednesday(): ?bool
{
return $this->isWednesday;
}
public function setIsWednesday(?bool $isWednesday): self
{
$this->isWednesday = $isWednesday;
return $this;
}
public function getIsThursday(): ?bool
{
return $this->isThursday;
}
public function setIsThursday(?bool $isThursday): self
{
$this->isThursday = $isThursday;
return $this;
}
public function getIsFriday(): ?bool
{
return $this->isFriday;
}
public function setIsFriday(?bool $isFriday): self
{
$this->isFriday = $isFriday;
return $this;
}
public function getIsSaturday(): ?bool
{
return $this->isSaturday;
}
public function setIsSaturday(bool $isSaturday): self
{
$this->isSaturday = $isSaturday;
return $this;
}
public function getIsSunday(): ?bool
{
return $this->isSunday;
}
public function setIsSunday(?bool $isSunday): self
{
$this->isSunday = $isSunday;
return $this;
}
public function getStartWorkAt(): ?\DateTimeInterface
{
return $this->startWorkAt;
}
public function setStartWorkAt(?\DateTimeInterface $startWorkAt): self
{
$this->startWorkAt = $startWorkAt;
return $this;
}
public function getEndWorkAt(): ?\DateTimeInterface
{
return $this->endWorkAt;
}
public function setEndWorkAt(?\DateTimeInterface $endWorkAt): self
{
$this->endWorkAt = $endWorkAt;
return $this;
}
public function getExcludeDays(): ?array
{
return $this->excludeDays;
}
public function setExcludeDays(?array $excludeDays): self
{
$this->excludeDays = $excludeDays;
return $this;
}
public function getExcludeDates(): ?array
{
return array_values($this->excludeDates);
}
public function getExcludeDatesOnlyDates(): ?array
{
return array_column($this->excludeDates,"date");
}
public function setExcludeDates(?array $excludeDates): self
{
$this->excludeDates = $excludeDates;
return $this;
}
public function getExcludeHours(): ?array
{
return $this->excludeHours;
}
public function setExcludeHours(?array $excludeHours): self
{
$this->excludeHours = $excludeHours;
return $this;
}
/**
* Get the value of logo
*/
public function getLogo()
{
return $this->logo;
}
/**
* Set the value of logo
*
* @return self
*/
public function setLogo($logo)
{
$this->logo = $logo;
return $this;
}
/**
* Get the value of favicon
*/
public function getFavicon()
{
return $this->favicon;
}
/**
* Set the value of favicon
*
* @return self
*/
public function setFavicon($favicon)
{
$this->favicon = $favicon;
return $this;
}
/**
* Get the value of logoBase64
*/
public function getLogoBase64()
{
return $this->logoBase64;
}
/**
* Set the value of logoBase64
*
* @return self
*/
public function setLogoBase64($logoBase64)
{
$this->logoBase64 = $logoBase64;
return $this;
}
/**
* Get the value of email
*/
public function getEmail()
{
return $this->email;
}
/**
* Set the value of email
*
* @return self
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getCurrency(): ?string
{
return $this->currency;
}
public function setCurrency(?string $currency): self
{
$this->currency = $currency;
return $this;
}
public function getDefaultLang(): ?string
{
return $this->defaultLang;
}
public function setDefaultLang(?string $defaultLang): self
{
$this->defaultLang = $defaultLang;
return $this;
}
public function getProjectName(): ?string
{
return $this->projectName;
}
public function setProjectName(?string $projectName): self
{
$this->projectName = $projectName;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getAssetFolderName(): ?string
{
return $this->assetFolderName;
}
public function setAssetFolderName(?string $assetFolderName): self
{
$this->assetFolderName = $assetFolderName;
return $this;
}
public function getMailOrderCreatedBody(): ?string
{
return $this->mailOrderCreatedBody;
}
public function setMailOrderCreatedBody(?string $mailOrderCreatedBody): self
{
$this->mailOrderCreatedBody = $mailOrderCreatedBody;
return $this;
}
public function getMailOrderCreatedTitle(): ?string
{
return $this->mailOrderCreatedTitle;
}
public function setMailOrderCreatedTitle(?string $mailOrderCreatedTitle): self
{
$this->mailOrderCreatedTitle = $mailOrderCreatedTitle;
return $this;
}
public function getPrefixOrder(): ?string
{
return $this->prefixOrder;
}
public function setPrefixOrder(?string $prefixOrder): self
{
$this->prefixOrder = $prefixOrder;
return $this;
}
public function getRootUrl(): ?string
{
return $this->rootUrl;
}
public function setRootUrl(?string $rootUrl): self
{
$this->rootUrl = $rootUrl;
return $this;
}
public function getFrontTheme(): ?FrontTheme
{
return $this->frontTheme;
}
public function setFrontTheme(?FrontTheme $frontTheme): self
{
$this->frontTheme = $frontTheme;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function isIsMercureEnabled(): ?bool
{
return $this->isMercureEnabled;
}
public function setIsMercureEnabled(?bool $isMercureEnabled): self
{
$this->isMercureEnabled = $isMercureEnabled;
return $this;
}
public function getMobileAppScheme(): ?string
{
return $this->mobileAppScheme;
}
public function setMobileAppScheme(?string $mobileAppScheme): self
{
$this->mobileAppScheme = $mobileAppScheme;
return $this;
}
public function getMobileAppSchemeDev(): ?string
{
return $this->mobileAppSchemeDev;
}
public function setMobileAppSchemeDev(?string $mobileAppSchemeDev): self
{
$this->mobileAppSchemeDev = $mobileAppSchemeDev;
return $this;
}
public function isDeveloppementEnv(): ?bool
{
return $this->developpementEnv;
}
public function setDeveloppementEnv(?bool $developpementEnv): self
{
$this->developpementEnv = $developpementEnv;
return $this;
}
public function isMobileAppSchemeIOS(): ?string
{
return $this->mobileAppSchemeIOS;
}
public function setMobileAppSchemeIOS(?string $mobileAppSchemeIOS): self
{
$this->mobileAppSchemeIOS = $mobileAppSchemeIOS;
return $this;
}
public function isMobileAppSchemeAndroid(): ?string
{
return $this->mobileAppSchemeAndroid;
}
public function setMobileAppSchemeAndroid(?string $mobileAppSchemeAndroid): self
{
$this->mobileAppSchemeAndroid = $mobileAppSchemeAndroid;
return $this;
}
public function getWebsiteTheme(): ?WebsiteTheme
{
return $this->websiteTheme;
}
public function setWebsiteTheme(?WebsiteTheme $websiteTheme): static
{
$this->websiteTheme = $websiteTheme;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): static
{
$this->title = $title;
return $this;
}
public function setTranslatableLocale($locale)
{
$this->locale = $locale;
}
public function isVatIncludedInOrders(): ?bool
{
return $this->vatIncludedInOrders;
}
public function setVatIncludedInOrders(?bool $vatIncludedInOrders): self
{
$this->vatIncludedInOrders = $vatIncludedInOrders;
return $this;
}
public function isVatDisplayedInOrders(): ?bool
{
return $this->vatDisplayedInOrders;
}
public function setVatDisplayedInOrders(?bool $vatDisplayedInOrders): self
{
$this->vatDisplayedInOrders = $vatDisplayedInOrders;
return $this;
}
public function getDefaultValueAddedTax(): ?ValueAddedTax
{
return $this->defaultValueAddedTax;
}
public function setDefaultValueAddedTax(?ValueAddedTax $defaultValueAddedTax): self
{
$this->defaultValueAddedTax = $defaultValueAddedTax;
return $this;
}
public function isSideBarMinimized(): ?bool
{
return $this->sideBarMinimized;
}
public function setSideBarMinimized(?bool $sideBarMinimized): self
{
$this->sideBarMinimized = $sideBarMinimized;
return $this;
}
public function getOrderPrefix(): ?string
{
return $this->orderPrefix;
}
public function setOrderPrefix(?string $orderPrefix): static
{
$this->orderPrefix = $orderPrefix;
return $this;
}
public function getInvoicePrefix(): ?string
{
return $this->invoicePrefix;
}
public function setInvoicePrefix(?string $invoicePrefix): static
{
$this->invoicePrefix = $invoicePrefix;
return $this;
}
public function isIsGeoLocalisationApiEnabled(): ?bool
{
return $this->isGeoLocalisationApiEnabled;
}
public function setIsGeoLocalisationApiEnabled(?bool $isGeoLocalisationApiEnabled): static
{
$this->isGeoLocalisationApiEnabled = $isGeoLocalisationApiEnabled;
return $this;
}
public function isIsWebSocketNotificationEnabled(): ?bool
{
return $this->isWebSocketNotificationEnabled;
}
public function setIsWebSocketNotificationEnabled(?bool $isWebSocketNotificationEnabled): static
{
$this->isWebSocketNotificationEnabled = $isWebSocketNotificationEnabled;
return $this;
}
public function getAbsoluteUrl(): ?string
{
return $this->absoluteUrl;
}
public function setAbsoluteUrl(?string $absoluteUrl): static
{
$this->absoluteUrl = $absoluteUrl;
return $this;
}
}