vendor/uvdesk/support-center-bundle/Entity/MarketingModule.php line 12

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\SupportCenterBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup;
  5. use Symfony\Component\HttpFoundation\File\UploadedFile;
  6. /**
  7.  * @ORM\Entity(repositoryClass="Webkul\UVDesk\SupportCenterBundle\Repository\MarketingModuleRepository")
  8.  */
  9. class MarketingModule
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $group;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $title;
  26.     /**
  27.      * @ORM\Column(type="boolean")
  28.      */
  29.     private $isActive;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $createdAt;
  34.     /**
  35.      * @ORM\Column(type="datetime", nullable=true)
  36.      */
  37.     private $updatedAt;
  38.     /**
  39.      * @ORM\Column(type="text", length=2000, nullable=true, name="description")
  40.      */
  41.     private $description;
  42.     /**
  43.      * @ORM\Column(type="string", nullable=true, length=255)
  44.      */
  45.     private $image;
  46.     /**
  47.      * @ORM\Column(type="string", length=255)
  48.      */
  49.     private $borderColor;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $linkURL;
  54.     /**
  55.      * Get id
  56.      *
  57.      * @return integer
  58.      */
  59.     public function getId()
  60.     {
  61.         return $this->id;
  62.     }
  63.     /**
  64.      * Set title
  65.      *
  66.      * @param string $title
  67.      *
  68.      * @return MarketingModule
  69.      */
  70.     public function setTitle($title)
  71.     {
  72.         $this->title $title;
  73.         return $this;
  74.     }
  75.     /**
  76.      * Get title
  77.      *
  78.      * @return string
  79.      */
  80.     public function getTitle()
  81.     {
  82.         return $this->title;
  83.     }
  84.     /**
  85.      * Set description
  86.      *
  87.      * @param string $description
  88.      *
  89.      * @return MarketingModule
  90.      */
  91.     public function setDescription($description)
  92.     {
  93.         $this->description $description;
  94.         return $this;
  95.     }
  96.     /**
  97.      * Get description
  98.      *
  99.      * @return string
  100.      */
  101.     public function getDescription()
  102.     {
  103.         return $this->description;
  104.     }
  105.     /**
  106.      * Set image
  107.      *
  108.      * @param string $image
  109.      *
  110.      * @return MarketingModule
  111.      */
  112.     public function setImage($image)
  113.     {
  114.         $this->image $image;
  115.         return $this;
  116.     }
  117.     /**
  118.      * Get image
  119.      *
  120.      * @return string
  121.      */
  122.     public function getImage()
  123.     {
  124.         return $this->image;
  125.     }
  126.     /**
  127.      * Set isActive
  128.      *
  129.      * @param boolean $isActive
  130.      *
  131.      * @return MarketingModule
  132.      */
  133.     public function setIsActive($isActive)
  134.     {
  135.         $this->isActive $isActive;
  136.         return $this;
  137.     }
  138.     /**
  139.      * Get isActive
  140.      *
  141.      * @return boolean
  142.      */
  143.     public function getIsActive()
  144.     {
  145.         return $this->isActive;
  146.     }
  147.     /**
  148.      * Set createdAt
  149.      *
  150.      * @param \DateTime $createdAt
  151.      *
  152.      * @return MarketingModule
  153.      */
  154.     public function setCreatedAt($createdAt)
  155.     {
  156.         $this->createdAt $createdAt;
  157.         return $this;
  158.     }
  159.     /**
  160.      * Get createdAt
  161.      *
  162.      * @return \DateTime
  163.      */
  164.     public function getCreatedAt()
  165.     {
  166.         return $this->createdAt;
  167.     }
  168.     /**
  169.      * Set updatedAt
  170.      *
  171.      * @param \DateTime $updatedAt
  172.      *
  173.      * @return MarketingModule
  174.      */
  175.     public function setUpdatedAt($updatedAt)
  176.     {
  177.         $this->updatedAt $updatedAt;
  178.         return $this;
  179.     }
  180.     /**
  181.      * Get updatedAt
  182.      *
  183.      * @return \DateTime
  184.      */
  185.     public function getUpdatedAt()
  186.     {
  187.         return $this->updatedAt;
  188.     }
  189.     /**
  190.      * Set group
  191.      *
  192.      * @return MarketingModule
  193.      */
  194.     public function setGroup(?SupportGroup $group null)
  195.     {
  196.         $this->group $group;
  197.         return $this;
  198.     }
  199.     /**
  200.      * Get group
  201.      *
  202.      * @return \Webkul\UserBundle\Entity\UserGroup
  203.      */
  204.     public function getGroup(): ?SupportGroup
  205.     {
  206.         return $this->group;
  207.     }
  208.     /**
  209.      * Set borderColor
  210.      *
  211.      * @param string $borderColor
  212.      *
  213.      * @return MarketingModule
  214.      */
  215.     public function setBorderColor($borderColor)
  216.     {
  217.         $this->borderColor $borderColor;
  218.         return $this;
  219.     }
  220.     /**
  221.      * Get borderColor
  222.      *
  223.      * @return string
  224.      */
  225.     public function getBorderColor()
  226.     {
  227.         return $this->borderColor;
  228.     }
  229.     public function getHexToRGBAColor($alpha)
  230.     {
  231.         $hex str_replace('#'''$this->getBorderColor());
  232.         // Convert hex to RGB
  233.         $r hexdec(substr($hex02));
  234.         $g hexdec(substr($hex22));
  235.         $b hexdec(substr($hex42));
  236.         // Return RGBA color
  237.         return "rgba($r$g$b$alpha)";
  238.     }
  239.     /**
  240.      * Set linkURL
  241.      *
  242.      * @param string $linkURL
  243.      *
  244.      * @return MarketingModule
  245.      */
  246.     public function setLinkURL($linkURL)
  247.     {
  248.         $this->linkURL $linkURL;
  249.         return $this;
  250.     }
  251.     /**
  252.      * Get linkURL
  253.      *
  254.      * @return string
  255.      */
  256.     public function getLinkURL()
  257.     {
  258.         return $this->linkURL;
  259.     }
  260. }