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.      * @ORM\Column(type="integer")
  128.      */
  129.     protected $viewedCount=0;
  130.     /**
  131.      * @ORM\Column(type="integer")
  132.      */
  133.     protected $clickedCount=0;
  134.     /**
  135.      * Constructor
  136.      */
  137.     public function __construct()
  138.     {
  139.         $this->languages = new \Doctrine\Common\Collections\ArrayCollection();
  140.         $this->departments = new \Doctrine\Common\Collections\ArrayCollection();
  141.     }
  142.     public function getEshopLinkId(): ?int
  143.     {
  144.         return $this->eshopLinkId;
  145.     }
  146.     public function getEshopLinkName(): ?string
  147.     {
  148.         return $this->eshopLinkName;
  149.     }
  150.     public function setEshopLinkName(string $eshopLinkName): static
  151.     {
  152.         $this->eshopLinkName $eshopLinkName;
  153.         return $this;
  154.     }
  155.     public function getEshopLinkDescription(): ?string
  156.     {
  157.         return $this->eshopLinkDescription;
  158.     }
  159.     public function setEshopLinkDescription(?string $eshopLinkDescription): static
  160.     {
  161.         $this->eshopLinkDescription $eshopLinkDescription;
  162.         return $this;
  163.     }
  164.     public function getEshopLinkUrl(): ?string
  165.     {
  166.         return $this->eshopLinkUrl;
  167.     }
  168.     public function setEshopLinkUrl(string $eshopLinkUrl): static
  169.     {
  170.         $this->eshopLinkUrl $eshopLinkUrl;
  171.         return $this;
  172.     }
  173.     public function getUserId(): ?int
  174.     {
  175.         return $this->userId;
  176.     }
  177.     public function setUserId(int $userId): static
  178.     {
  179.         $this->userId $userId;
  180.         return $this;
  181.     }
  182.     public function getEshopLinkType(): ?string
  183.     {
  184.         return $this->eshopLinkType;
  185.     }
  186.     public function setEshopLinkType(?string $eshopLinkType): static
  187.     {
  188.         $this->eshopLinkType $eshopLinkType;
  189.         return $this;
  190.     }
  191.     public function getPriority(): ?int
  192.     {
  193.         return $this->priority;
  194.     }
  195.     public function setPriority(?int $priority): static
  196.     {
  197.         $this->priority $priority;
  198.         return $this;
  199.     }
  200.     public function getStatus(): ?string
  201.     {
  202.         return $this->status;
  203.     }
  204.     public function setStatus(?string $status): static
  205.     {
  206.         $this->status $status;
  207.         return $this;
  208.     }
  209.     public function getDateInserted(): ?\DateTimeInterface
  210.     {
  211.         return $this->dateInserted;
  212.     }
  213.     public function setDateInserted(?\DateTimeInterface $dateInserted): static
  214.     {
  215.         $this->dateInserted $dateInserted;
  216.         return $this;
  217.     }
  218.     public function getDateLastControl(): ?\DateTimeInterface
  219.     {
  220.         return $this->dateLastControl;
  221.     }
  222.     public function setDateLastControl(?\DateTimeInterface $dateLastControl): static
  223.     {
  224.         $this->dateLastControl $dateLastControl;
  225.         return $this;
  226.     }
  227.     public function getLogoUrl(): ?string
  228.     {
  229.         return $this->logoUrl;
  230.     }
  231.     public function setLogoUrl(?string $logoUrl): static
  232.     {
  233.         $this->logoUrl $logoUrl;
  234.         return $this;
  235.     }
  236.     public function getNotes(): ?string
  237.     {
  238.         return $this->notes;
  239.     }
  240.     public function setNotes(?string $notes): static
  241.     {
  242.         $this->notes $notes;
  243.         return $this;
  244.     }
  245.     public function getAdminUserId(): ?int
  246.     {
  247.         return $this->adminUserId;
  248.     }
  249.     public function setAdminUserId(?int $adminUserId): static
  250.     {
  251.         $this->adminUserId $adminUserId;
  252.         return $this;
  253.     }
  254.     public function getEshopLinkEmail(): ?string
  255.     {
  256.         return $this->eshopLinkEmail;
  257.     }
  258.     public function setEshopLinkEmail(?string $eshopLinkEmail): static
  259.     {
  260.         $this->eshopLinkEmail $eshopLinkEmail;
  261.         return $this;
  262.     }
  263.     public function getPreferredLanguageId(): ?int
  264.     {
  265.         return $this->preferredLanguageId;
  266.     }
  267.     public function setPreferredLanguageId(int $preferredLanguageId): static
  268.     {
  269.         $this->preferredLanguageId $preferredLanguageId;
  270.         return $this;
  271.     }
  272.     public function getCutLongDescription(): ?int
  273.     {
  274.         return $this->cutLongDescription;
  275.     }
  276.     public function setCutLongDescription(?int $cutLongDescription): static
  277.     {
  278.         $this->cutLongDescription $cutLongDescription;
  279.         return $this;
  280.     }
  281.     public function isEshopLinkCurrent(): ?bool
  282.     {
  283.         return $this->eshopLinkCurrent;
  284.     }
  285.     public function setEshopLinkCurrent(?bool $eshopLinkCurrent): static
  286.     {
  287.         $this->eshopLinkCurrent $eshopLinkCurrent;
  288.         return $this;
  289.     }
  290.     /**
  291.      * @return Collection<int, Language>
  292.      */
  293.     public function getLanguages(): Collection
  294.     {
  295.         return $this->languages;
  296.     }
  297.     public function addLanguage(Language $language): static
  298.     {
  299.         if (!$this->languages->contains($language)) {
  300.             $this->languages->add($language);
  301.         }
  302.         return $this;
  303.     }
  304.     public function removeLanguage(Language $language): static
  305.     {
  306.         $this->languages->removeElement($language);
  307.         return $this;
  308.     }
  309.     /**
  310.      * @return Collection<int, Department>
  311.      */
  312.     public function getDepartments(): Collection
  313.     {
  314.         return $this->departments;
  315.     }
  316.     public function addDepartment(Department $department): static
  317.     {
  318.         if (!$this->departments->contains($department)) {
  319.             $this->departments->add($department);
  320.         }
  321.         return $this;
  322.     }
  323.     public function removeDepartment(Department $department): static
  324.     {
  325.         $this->departments->removeElement($department);
  326.         return $this;
  327.     }
  328.     /**
  329.      * Set locale
  330.      *
  331.      * @param string $locale
  332.      *
  333.      * @return WebPage
  334.      */
  335.     public function setLocale($locale)
  336.     {
  337.         $this->locale $locale;
  338.         return $this;
  339.     }
  340.     /**
  341.      * Get locale
  342.      *
  343.      * @return string
  344.      */
  345.     public function getLocale()
  346.     {
  347.         return $this->locale;
  348.     }
  349.     public function getViewedCount(): ?int
  350.     {
  351.         return $this->viewedCount;
  352.     }
  353.     public function setViewedCount(int $viewedCount): static
  354.     {
  355.         $this->viewedCount $viewedCount;
  356.         return $this;
  357.     }
  358.     public function getClickedCount(): ?int
  359.     {
  360.         return $this->clickedCount;
  361.     }
  362.     public function setClickedCount(int $clickedCount): static
  363.     {
  364.         $this->clickedCount $clickedCount;
  365.         return $this;
  366.     }
  367. }