src/Entity/EshopLink.php line 16

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\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\EntityRepo\EshopLinkRepo")
  11.  * @ORM\Table(name="eshop_link")
  12.  * @Gedmo\TranslationEntity(class="App\Entity\EshopLinkTranslation")
  13.  */
  14. class EshopLink implements Translatable
  15. {
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */ 
  21.     protected $eshopLinkId=0;
  22.     
  23.     /**
  24.      * @ORM\Column(type="string", length=100)
  25.      * @Gedmo\Translatable     
  26.      */
  27.     protected $eshopLinkName
  28.     /**
  29.      * @ORM\Column(type="text", nullable=true)
  30.      * @Gedmo\Translatable     
  31.      */
  32.     protected $eshopLinkDescription;  
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      * @Gedmo\Translatable     
  36.      */
  37.     protected $eshopLinkUrl;     
  38.     /**
  39.      * @ORM\Column(type="integer")
  40.      */
  41.     protected $userId=0;    
  42.     /**
  43.      * @ORM\Column(type="string", length=100, nullable=true)
  44.      */
  45.     protected $eshopLinkType='eshop';
  46.     
  47.     /**
  48.      * @ORM\Column(type="integer", nullable=true)
  49.      */
  50.     protected $priority=1;   
  51.     
  52.     /**
  53.      * @ORM\Column(type="string", length=100, nullable=true)
  54.      */
  55.     protected $status='new';    
  56.     
  57.     /**
  58.      * @ORM\Column(type="date", nullable=true, nullable=true)
  59.      */
  60.     protected $dateInserted;
  61.     
  62.     /**
  63.      * @ORM\Column(type="date", nullable=true, nullable=true)
  64.      */
  65.     protected $dateLastControl;    
  66.     
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      */
  70.     protected $logoUrl;    
  71.     
  72.     /**
  73.      * @ORM\Column(type="text", nullable=true)
  74.      */
  75.     protected $notes;    
  76.     
  77.     /**
  78.      * @ORM\Column(type="integer", nullable=true)
  79.      */
  80.     protected $adminUserId=0;    
  81.     
  82.     /**
  83.      * @ORM\Column(type="string", length=255, nullable=true)
  84.      */
  85.     protected $eshopLinkEmail;    
  86.     
  87.     /**
  88.      * Many Eshops have Many Languages.
  89.      * @ORM\ManyToMany(targetEntity="Language",cascade={"persist"})
  90.      * @ORM\JoinTable(name="eshop_link_language",
  91.      *      joinColumns={@ORM\JoinColumn(name="eshop_link_id", referencedColumnName="eshop_link_id")},
  92.      *      inverseJoinColumns={@ORM\JoinColumn(name="lang_id", referencedColumnName="lang_id", unique=false)}
  93.      *      )
  94.      */
  95.     protected $languages;
  96.     
  97.     /**
  98.      * @ORM\Column(type="integer")
  99.      */
  100.     protected $preferredLanguageId=0;
  101.     /**
  102.      * @ORM\Column(type="integer", nullable=true)
  103.      */
  104.     protected $cutLongDescription=0
  105.     /**
  106.      * Post locale
  107.      * Used locale to override Translation listener's locale
  108.      *
  109.      * @Gedmo\Locale
  110.      * 
  111.      */
  112.     protected $locale;  
  113.     /**
  114.      * @ORM\Column(type="boolean", nullable=true)
  115.      */
  116.     protected $eshopLinkCurrent;     
  117.     /**
  118.      * One EshopLink has Many Departments.
  119.      * @ORM\ManyToMany(targetEntity="Department",cascade={"persist"})
  120.      * @ORM\JoinTable(name="eshop_link_department",
  121.      *      joinColumns={@ORM\JoinColumn(name="eshop_link_id", referencedColumnName="eshop_link_id")},
  122.      *      inverseJoinColumns={@ORM\JoinColumn(name="department_id", referencedColumnName="department_id", unique=false)}
  123.      *      )
  124.      */
  125.     protected $departments;      
  126.     /**
  127.      * Constructor
  128.      */
  129.     public function __construct()
  130.     {
  131.         $this->languages = new \Doctrine\Common\Collections\ArrayCollection();
  132.         $this->departments = new \Doctrine\Common\Collections\ArrayCollection();
  133.     }
  134.     public function getEshopLinkId(): ?int
  135.     {
  136.         return $this->eshopLinkId;
  137.     }
  138.     public function getEshopLinkName(): ?string
  139.     {
  140.         return $this->eshopLinkName;
  141.     }
  142.     public function setEshopLinkName(string $eshopLinkName): static
  143.     {
  144.         $this->eshopLinkName $eshopLinkName;
  145.         return $this;
  146.     }
  147.     public function getEshopLinkDescription(): ?string
  148.     {
  149.         return $this->eshopLinkDescription;
  150.     }
  151.     public function setEshopLinkDescription(?string $eshopLinkDescription): static
  152.     {
  153.         $this->eshopLinkDescription $eshopLinkDescription;
  154.         return $this;
  155.     }
  156.     public function getEshopLinkUrl(): ?string
  157.     {
  158.         return $this->eshopLinkUrl;
  159.     }
  160.     public function setEshopLinkUrl(string $eshopLinkUrl): static
  161.     {
  162.         $this->eshopLinkUrl $eshopLinkUrl;
  163.         return $this;
  164.     }
  165.     public function getUserId(): ?int
  166.     {
  167.         return $this->userId;
  168.     }
  169.     public function setUserId(int $userId): static
  170.     {
  171.         $this->userId $userId;
  172.         return $this;
  173.     }
  174.     public function getEshopLinkType(): ?string
  175.     {
  176.         return $this->eshopLinkType;
  177.     }
  178.     public function setEshopLinkType(?string $eshopLinkType): static
  179.     {
  180.         $this->eshopLinkType $eshopLinkType;
  181.         return $this;
  182.     }
  183.     public function getPriority(): ?int
  184.     {
  185.         return $this->priority;
  186.     }
  187.     public function setPriority(?int $priority): static
  188.     {
  189.         $this->priority $priority;
  190.         return $this;
  191.     }
  192.     public function getStatus(): ?string
  193.     {
  194.         return $this->status;
  195.     }
  196.     public function setStatus(?string $status): static
  197.     {
  198.         $this->status $status;
  199.         return $this;
  200.     }
  201.     public function getDateInserted(): ?\DateTimeInterface
  202.     {
  203.         return $this->dateInserted;
  204.     }
  205.     public function setDateInserted(?\DateTimeInterface $dateInserted): static
  206.     {
  207.         $this->dateInserted $dateInserted;
  208.         return $this;
  209.     }
  210.     public function getDateLastControl(): ?\DateTimeInterface
  211.     {
  212.         return $this->dateLastControl;
  213.     }
  214.     public function setDateLastControl(?\DateTimeInterface $dateLastControl): static
  215.     {
  216.         $this->dateLastControl $dateLastControl;
  217.         return $this;
  218.     }
  219.     public function getLogoUrl(): ?string
  220.     {
  221.         return $this->logoUrl;
  222.     }
  223.     public function setLogoUrl(?string $logoUrl): static
  224.     {
  225.         $this->logoUrl $logoUrl;
  226.         return $this;
  227.     }
  228.     public function getNotes(): ?string
  229.     {
  230.         return $this->notes;
  231.     }
  232.     public function setNotes(?string $notes): static
  233.     {
  234.         $this->notes $notes;
  235.         return $this;
  236.     }
  237.     public function getAdminUserId(): ?int
  238.     {
  239.         return $this->adminUserId;
  240.     }
  241.     public function setAdminUserId(?int $adminUserId): static
  242.     {
  243.         $this->adminUserId $adminUserId;
  244.         return $this;
  245.     }
  246.     public function getEshopLinkEmail(): ?string
  247.     {
  248.         return $this->eshopLinkEmail;
  249.     }
  250.     public function setEshopLinkEmail(?string $eshopLinkEmail): static
  251.     {
  252.         $this->eshopLinkEmail $eshopLinkEmail;
  253.         return $this;
  254.     }
  255.     public function getPreferredLanguageId(): ?int
  256.     {
  257.         return $this->preferredLanguageId;
  258.     }
  259.     public function setPreferredLanguageId(int $preferredLanguageId): static
  260.     {
  261.         $this->preferredLanguageId $preferredLanguageId;
  262.         return $this;
  263.     }
  264.     public function getCutLongDescription(): ?int
  265.     {
  266.         return $this->cutLongDescription;
  267.     }
  268.     public function setCutLongDescription(?int $cutLongDescription): static
  269.     {
  270.         $this->cutLongDescription $cutLongDescription;
  271.         return $this;
  272.     }
  273.     public function isEshopLinkCurrent(): ?bool
  274.     {
  275.         return $this->eshopLinkCurrent;
  276.     }
  277.     public function setEshopLinkCurrent(?bool $eshopLinkCurrent): static
  278.     {
  279.         $this->eshopLinkCurrent $eshopLinkCurrent;
  280.         return $this;
  281.     }
  282.     /**
  283.      * @return Collection<int, Language>
  284.      */
  285.     public function getLanguages(): Collection
  286.     {
  287.         return $this->languages;
  288.     }
  289.     public function addLanguage(Language $language): static
  290.     {
  291.         if (!$this->languages->contains($language)) {
  292.             $this->languages->add($language);
  293.         }
  294.         return $this;
  295.     }
  296.     public function removeLanguage(Language $language): static
  297.     {
  298.         $this->languages->removeElement($language);
  299.         return $this;
  300.     }
  301.     /**
  302.      * @return Collection<int, Department>
  303.      */
  304.     public function getDepartments(): Collection
  305.     {
  306.         return $this->departments;
  307.     }
  308.     public function addDepartment(Department $department): static
  309.     {
  310.         if (!$this->departments->contains($department)) {
  311.             $this->departments->add($department);
  312.         }
  313.         return $this;
  314.     }
  315.     public function removeDepartment(Department $department): static
  316.     {
  317.         $this->departments->removeElement($department);
  318.         return $this;
  319.     }
  320.     /**
  321.      * Set locale
  322.      *
  323.      * @param string $locale
  324.      *
  325.      * @return WebPage
  326.      */
  327.     public function setLocale($locale)
  328.     {
  329.         $this->locale $locale;
  330.         return $this;
  331.     }
  332.     /**
  333.      * Get locale
  334.      *
  335.      * @return string
  336.      */
  337.     public function getLocale()
  338.     {
  339.         return $this->locale;
  340.     }
  341. }