<?php
namespace App\Entity\System;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="ps_lang")
*
* @ORM\Entity(repositoryClass="App\Repository\System\LanguageRepository")
*/
class Language
{
public const SPANISH_LANGUAGE_ID = 4;
public const ENGLISH_LANGUAGE_ID = 1;
public const ENGLISH_ISO = 'en';
public const SPANISH_ISO = 'es';
public const FRENCH_ISO = 'fr';
public const ITALIAN_ISO = 'it';
public const GERMAN_ISO = 'de';
public const EMAIL_ENABLED_LANGUAGES = [self::ENGLISH_ISO, self::SPANISH_ISO, self::FRENCH_ISO, self::ITALIAN_ISO, self::GERMAN_ISO];
public const ENGLISH_NAME = 'English';
public const LANG_IDS_INDEXED_BY_ISOCODE = [
'en' => 1,
'es' => 4,
'fr' => 5,
'de' => 6,
'pt' => 7,
'el' => 8,
'hr' => 9,
'it' => 10,
'et' => 11,
'da' => 12,
'fi' => 13,
'ro' => 14,
'bg' => 15,
'hu' => 16,
'sk' => 18,
'si' => 19,
'lt' => 20,
'lv' => 21,
'pl' => 22,
'nl' => 24,
'ru' => 25,
'no' => 26,
'sv' => 27,
'cs' => 28,
];
/**
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(name="id_lang", type="integer", options={"unsigned":true})
*/
private $id;
/**
* @ORM\Column(type="string", length=32)
*/
private $name;
/**
* @ORM\Column(type="boolean", options={"unsigned":true, "default":0})
*/
private $active;
/**
* @ORM\Column(type="string", length=2)
*/
private $isoCode;
/**
* @ORM\Column(type="string", length=5)
*/
private $languageCode;
/**
* @ORM\Column(type="string")
*/
private $dateFormatLite;
/**
* @ORM\Column(type="string")
*/
private $dateFormatFull;
/**
* @ORM\Column(type="string", length=32)
*/
private $dictionary;
/**
* @ORM\Column(type="integer")
*/
private $currencyFormat;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $isoCodeReal;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private string $nameEnglish;
/**
* @ORM\OneToMany(targetEntity="App\Entity\System\CountryLanguage", mappedBy="language")
*/
private $countryLanguages;
/**
* @ORM\OneToMany(targetEntity="App\Entity\System\Pack", mappedBy="language")
*/
private $packs;
/**
* @ORM\OneToMany(targetEntity="App\Entity\System\Answer", mappedBy="language")
*/
private $answers;
/**
* @ORM\OneToMany(targetEntity="Question", mappedBy="language")
*/
private $questions;
public function __construct()
{
$this->packs = new ArrayCollection();
$this->countryLanguages = new ArrayCollection();
$this->questions = new ArrayCollection();
$this->answers = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
/**
* @return $this
*/
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
/**
* @return $this
*/
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getIsoCode(): ?string
{
return $this->isoCode;
}
/**
* @return $this
*/
public function setIsoCode(string $isoCode): self
{
$this->isoCode = $isoCode;
return $this;
}
public function getLanguageCode(): ?string
{
return $this->languageCode;
}
/**
* @return $this
*/
public function setLanguageCode(string $languageCode): self
{
$this->languageCode = $languageCode;
return $this;
}
public function getDateFormatLite(): string
{
return $this->dateFormatLite;
}
/**
* @return $this
*/
public function setDateFormatLite(string $dateFormatLite): self
{
$this->dateFormatLite = $dateFormatLite;
return $this;
}
public function getDateFormatFull(): string
{
return $this->dateFormatFull;
}
/**
* @return $this
*/
public function setDateFormatFull(string $dateFormatFull): self
{
$this->dateFormatFull = $dateFormatFull;
return $this;
}
public function getDictionary(): ?string
{
return $this->dictionary;
}
/**
* @return $this
*/
public function setDictionary(string $dictionary): self
{
$this->dictionary = $dictionary;
return $this;
}
public function getCurrencyFormat(): ?int
{
return $this->currencyFormat;
}
/**
* @return $this
*/
public function setCurrencyFormat(int $currencyFormat): self
{
$this->currencyFormat = $currencyFormat;
return $this;
}
public function getIsoCodeReal(): ?string
{
return $this->isoCodeReal;
}
/**
* @return $this
*/
public function setIsoCodeReal(?string $isoCodeReal): self
{
$this->isoCodeReal = $isoCodeReal;
return $this;
}
/**
* @return mixed
*/
public function getNameEnglish()
{
return $this->nameEnglish;
}
/**
* @param mixed $nameEnglish
*/
public function setNameEnglish($nameEnglish): void
{
$this->nameEnglish = $nameEnglish;
}
/**
* @return ArrayCollection|CountryLanguage[]|null
*/
public function getCountryLanguages()
{
return $this->countryLanguages;
}
/**
* @param ArrayCollection|CountryLanguage[]|null $countryLanguages
*/
public function setCountryLanguages($countryLanguages): self
{
$this->countryLanguages = $countryLanguages;
return $this;
}
/**
* @return ArrayCollection|Pack[]
*/
public function getPacks()
{
return $this->packs;
}
/**
* @param ArrayCollection|Pack[] $packs
*/
public function setPacks($packs): self
{
$this->packs = $packs;
return $this;
}
public function getAnswers(): ArrayCollection
{
return $this->answers;
}
public function setAnswers(ArrayCollection $answers): self
{
$this->answers = $answers;
return $this;
}
public function getQuestions(): ArrayCollection
{
return $this->questions;
}
public function setQuestions(ArrayCollection $questions): self
{
$this->questions = $questions;
return $this;
}
}