<?php
namespace App\Entity;
use App\Entity\Benefice\BeneficeItemsLang;
use App\Entity\Benefice\BeneficeLang;
use App\Entity\Carrousel\carrouselItemsLang;
use App\Entity\Carrousel\carrouselLang;
use App\Entity\ClientBlocs\ClientBlocLang;
use App\Entity\ItemsSolution\ItemsSolutionLang;
use App\Entity\Labels\LabelBlocLang;
use App\Entity\Labels\LabelSliderLang;
use App\Entity\Pages\PageSousCategoryLang;
use App\Entity\User\UserStatusLang;
use App\Repository\LanguagesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LanguagesRepository::class)]
class Languages
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 10)]
private ?string $code = null;
#[ORM\Column]
private ?bool $isActif = null;
#[ORM\Column]
private ?bool $isDefault = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $createdAt = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $updatedAt = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $deletedAt = null;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: ClientBlocLang::class)]
private Collection $clientBlocLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: LabelBlocLang::class)]
private Collection $labelBlocLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: LabelSliderLang::class)]
private Collection $labelSliderLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: ItemsSolutionLang::class)]
private Collection $itemsSolutionLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: BeneficeLang::class)]
private Collection $beneficeLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: BeneficeItemsLang::class)]
private Collection $beneficeItemsLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: PageSousCategoryLang::class)]
private Collection $pageSousCategoryLangs;
#[ORM\OneToMany(mappedBy: 'language', targetEntity: UserStatusLang::class)]
private Collection $userStatusLangs;
public function __construct()
{
$this->clientBlocLangs = new ArrayCollection();
$this->labelBlocLangs = new ArrayCollection();
$this->labelSliderLangs = new ArrayCollection();
$this->itemsSolutionLangs = new ArrayCollection();
$this->beneficeLangs = new ArrayCollection();
$this->beneficeItemsLangs = new ArrayCollection();
$this->pageSousCategoryLangs = new ArrayCollection();
$this->userStatusLangs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function isIsActif(): ?bool
{
return $this->isActif;
}
public function setIsActif(bool $isActif): self
{
$this->isActif = $isActif;
return $this;
}
public function isIsDefault(): ?bool
{
return $this->isDefault;
}
public function setIsDefault(bool $isDefault): self
{
$this->isDefault = $isDefault;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
/**
* @return Collection<int, ClientBlocLang>
*/
public function getClientBlocLangs(): Collection
{
return $this->clientBlocLangs;
}
public function addClientBlocLang(ClientBlocLang $clientBlocLang): self
{
if (!$this->clientBlocLangs->contains($clientBlocLang)) {
$this->clientBlocLangs->add($clientBlocLang);
$clientBlocLang->setLanguage($this);
}
return $this;
}
public function removeClientBlocLang(ClientBlocLang $clientBlocLang): self
{
if ($this->clientBlocLangs->removeElement($clientBlocLang)) {
// set the owning side to null (unless already changed)
if ($clientBlocLang->getLanguage() === $this) {
$clientBlocLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, LabelBlocLang>
*/
public function getLabelBlocLangs(): Collection
{
return $this->labelBlocLangs;
}
public function addLabelBlocLang(LabelBlocLang $labelBlocLang): self
{
if (!$this->labelBlocLangs->contains($labelBlocLang)) {
$this->labelBlocLangs->add($labelBlocLang);
$labelBlocLang->setLanguage($this);
}
return $this;
}
public function removeLabelBlocLang(LabelBlocLang $labelBlocLang): self
{
if ($this->labelBlocLangs->removeElement($labelBlocLang)) {
// set the owning side to null (unless already changed)
if ($labelBlocLang->getLanguage() === $this) {
$labelBlocLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, LabelSliderLang>
*/
public function getLabelSliderLangs(): Collection
{
return $this->labelSliderLangs;
}
public function addLabelSliderLang(LabelSliderLang $labelSliderLang): self
{
if (!$this->labelSliderLangs->contains($labelSliderLang)) {
$this->labelSliderLangs->add($labelSliderLang);
$labelSliderLang->setLanguage($this);
}
return $this;
}
public function removeLabelSliderLang(LabelSliderLang $labelSliderLang): self
{
if ($this->labelSliderLangs->removeElement($labelSliderLang)) {
// set the owning side to null (unless already changed)
if ($labelSliderLang->getLanguage() === $this) {
$labelSliderLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, ItemsSolutionLang>
*/
public function getItemsSolutionLangs(): Collection
{
return $this->itemsSolutionLangs;
}
public function addItemsSolutionLang(ItemsSolutionLang $itemsSolutionLang): self
{
if (!$this->itemsSolutionLangs->contains($itemsSolutionLang)) {
$this->itemsSolutionLangs->add($itemsSolutionLang);
$itemsSolutionLang->setLanguage($this);
}
return $this;
}
public function removeItemsSolutionLang(ItemsSolutionLang $itemsSolutionLang): self
{
if ($this->itemsSolutionLangs->removeElement($itemsSolutionLang)) {
// set the owning side to null (unless already changed)
if ($itemsSolutionLang->getLanguage() === $this) {
$itemsSolutionLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BeneficeLang>
*/
public function getBeneficeLangs(): Collection
{
return $this->beneficeLangs;
}
public function addBeneficeLang(BeneficeLang $beneficeLang): self
{
if (!$this->beneficeLangs->contains($beneficeLang)) {
$this->beneficeLangs->add($beneficeLang);
$beneficeLang->setLanguage($this);
}
return $this;
}
public function removeBeneficeLang(BeneficeLang $beneficeLang): self
{
if ($this->beneficeLangs->removeElement($beneficeLang)) {
// set the owning side to null (unless already changed)
if ($beneficeLang->getLanguage() === $this) {
$beneficeLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BeneficeItemsLang>
*/
public function getBeneficeItemsLangs(): Collection
{
return $this->beneficeItemsLangs;
}
public function addBeneficeItemsLang(BeneficeItemsLang $beneficeItemsLang): self
{
if (!$this->beneficeItemsLangs->contains($beneficeItemsLang)) {
$this->beneficeItemsLangs->add($beneficeItemsLang);
$beneficeItemsLang->setLanguage($this);
}
return $this;
}
public function removeBeneficeItemsLang(BeneficeItemsLang $beneficeItemsLang): self
{
if ($this->beneficeItemsLangs->removeElement($beneficeItemsLang)) {
// set the owning side to null (unless already changed)
if ($beneficeItemsLang->getLanguage() === $this) {
$beneficeItemsLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, PageSousCategoryLang>
*/
public function getPageSousCategoryLangs(): Collection
{
return $this->pageSousCategoryLangs;
}
public function addPageSousCategoryLang(PageSousCategoryLang $pageSousCategoryLang): self
{
if (!$this->pageSousCategoryLangs->contains($pageSousCategoryLang)) {
$this->pageSousCategoryLangs->add($pageSousCategoryLang);
$pageSousCategoryLang->setLanguage($this);
}
return $this;
}
public function removePageSousCategoryLang(PageSousCategoryLang $pageSousCategoryLang): self
{
if ($this->pageSousCategoryLangs->removeElement($pageSousCategoryLang)) {
// set the owning side to null (unless already changed)
if ($pageSousCategoryLang->getLanguage() === $this) {
$pageSousCategoryLang->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, UserStatusLang>
*/
public function getUserStatusLangs(): Collection
{
return $this->userStatusLangs;
}
public function addUserStatusLang(UserStatusLang $userStatusLang): self
{
if (!$this->userStatusLangs->contains($userStatusLang)) {
$this->userStatusLangs->add($userStatusLang);
$userStatusLang->setLanguage($this);
}
return $this;
}
public function removeUserStatusLang(UserStatusLang $userStatusLang): self
{
if ($this->userStatusLangs->removeElement($userStatusLang)) {
// set the owning side to null (unless already changed)
if ($userStatusLang->getLanguage() === $this) {
$userStatusLang->setLanguage(null);
}
}
return $this;
}
}