src/Entity/ApidaeTranslationConfig.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity (repositoryClass="App\Repository\ApidaeTranslationConfigRepository")
  8.  */
  9. class ApidaeTranslationConfig
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $apiKey;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\ApidaeWriteConfiguration", inversedBy="apidaeTranslationConfigs")
  27.      * @ORM\JoinColumns({
  28.      *   @ORM\JoinColumn(name="write_configuration_id", referencedColumnName="id")
  29.      * })
  30.      */
  31.     private $writeConfiguration;
  32.     /**
  33.      * @ORM\Column(type="json", nullable=true)
  34.      */
  35.     private $fields;
  36.     /**
  37.      * @ORM\Column(type="json", nullable=true)
  38.      */
  39.     private $languages;
  40.     /**
  41.      * @ORM\Column(type="json", nullable=true)
  42.      */
  43.     private $filterParams;
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity="App\Entity\Selection", inversedBy="apidaeTranslationConfigs")
  46.      * @ORM\JoinColumns({
  47.      *   @ORM\JoinColumn(name="selection_id", referencedColumnName="id")
  48.      * })
  49.      */
  50.     private $selection;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="apidaeTranslationConfigs")
  53.      */
  54.     private $owner;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="apidaeTranslationConfigs")
  57.      */
  58.     private $entity;
  59.     /**
  60.      * @ORM\Column(type="datetime", nullable=true)
  61.      */
  62.     private $createdAt;
  63.     /**
  64.      * @ORM\Column(type="datetime", nullable=true)
  65.      */
  66.     private $updatedAt;
  67.     /**
  68.      * @ORM\Column(type="integer", nullable=true)
  69.      */
  70.     private $state;
  71.     /**
  72.      * @var \Doctrine\Common\Collections\Collection
  73.      *
  74.      * @ORM\OneToMany(targetEntity="App\Entity\ApidaeTranslationHistory", mappedBy="translationConfig", cascade={"persist", "remove"})
  75.      */
  76.     private $apidaeTranslationHistorys;
  77.     public function __construct()
  78.     {
  79.     }
  80.     public function getId() : ?int
  81.     {
  82.         return $this->id;
  83.     }
  84.     public function getName() : ?string
  85.     {
  86.         return $this->name;
  87.     }
  88.     public function setName(?string $name) : self
  89.     {
  90.         $this->name $name;
  91.         return $this;
  92.     }
  93.     public function getApiKey() : ?string
  94.     {
  95.         return $this->apiKey;
  96.     }
  97.     public function setApiKey(?string $apiKey) : self
  98.     {
  99.         $this->apiKey $apiKey;
  100.         return $this;
  101.     }
  102.     public function getFields() : ?array
  103.     {
  104.         return $this->fields;
  105.     }
  106.     public function setFields(?array $fields) : self
  107.     {
  108.         $this->fields $fields;
  109.         return $this;
  110.     }
  111.     public function getLanguages() : ?array
  112.     {
  113.         return $this->languages;
  114.     }
  115.     public function setLanguages(?array $languages) : self
  116.     {
  117.         $this->languages $languages;
  118.         return $this;
  119.     }
  120.     public function getFilterParams() : ?array
  121.     {
  122.         return $this->filterParams;
  123.     }
  124.     public function setFilterParams(?array $filterParams) : self
  125.     {
  126.         $this->filterParams $filterParams;
  127.         return $this;
  128.     }
  129.     public function getOwner() : ?User
  130.     {
  131.         return $this->owner;
  132.     }
  133.     public function setOwner(?User $owner) : self
  134.     {
  135.         $this->owner $owner;
  136.         return $this;
  137.     }
  138.     public function getEntity() : ?DnsitEntity
  139.     {
  140.         return $this->entity;
  141.     }
  142.     public function setEntity(?DnsitEntity $entity) : self
  143.     {
  144.         $this->entity $entity;
  145.         return $this;
  146.     }
  147.     public function getCreatedAt() : ?\DateTimeInterface
  148.     {
  149.         return $this->createdAt;
  150.     }
  151.     public function setCreatedAt(?\DateTimeInterface $createdAt) : self
  152.     {
  153.         $this->createdAt $createdAt;
  154.         return $this;
  155.     }
  156.     public function getUpdatedAt() : ?\DateTimeInterface
  157.     {
  158.         return $this->updatedAt;
  159.     }
  160.     public function setUpdatedAt(?\DateTimeInterface $updatedAt) : self
  161.     {
  162.         $this->updatedAt $updatedAt;
  163.         return $this;
  164.     }
  165.     public function getState() : ?int
  166.     {
  167.         return $this->state;
  168.     }
  169.     public function setState(?int $state) : self
  170.     {
  171.         $this->state $state;
  172.         return $this;
  173.     }
  174.     public function getSelection() : ?Selection
  175.     {
  176.         return $this->selection;
  177.     }
  178.     public function setSelection(?Selection $selection) : self
  179.     {
  180.         $this->selection $selection;
  181.         return $this;
  182.     }
  183.     public function getWriteConfiguration() : ?ApidaeWriteConfiguration
  184.     {
  185.         return $this->writeConfiguration;
  186.     }
  187.     public function setWriteConfiguration(?ApidaeWriteConfiguration $writeConfiguration) : self
  188.     {
  189.         $this->writeConfiguration $writeConfiguration;
  190.         return $this;
  191.     }
  192.     /**
  193.      * @return Collection|ApidaeTranslationHistory[]
  194.      */
  195.     public function getApidaeTranslationHistorys() : Collection
  196.     {
  197.         return $this->apidaeTranslationHistorys;
  198.     }
  199.     public function addApidaeTranslationHistory(ApidaeTranslationHistory $apidaeTranslationHistory) : self
  200.     {
  201.         if (!$this->apidaeTranslationHistorys->contains($apidaeTranslationHistory)) {
  202.             $this->apidaeTranslationHistorys[] = $apidaeTranslationHistory;
  203.             $apidaeTranslationHistory->setTranslationConfig($this);
  204.         }
  205.         return $this;
  206.     }
  207.     public function removeApidaeTranslationHistory(ApidaeTranslationHistory $apidaeTranslationHistory) : self
  208.     {
  209.         if ($this->apidaeTranslationHistorys->contains($apidaeTranslationHistory)) {
  210.             $this->apidaeTranslationHistorys->removeElement($apidaeTranslationHistory);
  211.             // set the owning side to null (unless already changed)
  212.             if ($apidaeTranslationHistory->getTranslationConfig() === $this) {
  213.                 $apidaeTranslationHistory->setTranslationConfig(null);
  214.             }
  215.         }
  216.         return $this;
  217.     }
  218. }