src/Entity/Gallery.php line 25

Open in your IDE?
  1. <?php
  2. /**
  3.  * Service class represents simple model of Gallery entity
  4.  *
  5.  * $Project: Alliancemarkets2 $
  6.  * $Id$
  7.  *
  8.  * @package alliancemarkets2
  9.  * @author George Matyas <webexciter@yahoo.com>
  10.  * @version $Revision$
  11.  */
  12. // src/AppBundle/Entity/Gallery.php
  13. namespace App\Entity;
  14. use Doctrine\Common\Collections\ArrayCollection;
  15. use Doctrine\Common\Collections\Collection;
  16. use Doctrine\DBAL\Types\Types;
  17. use Doctrine\ORM\Mapping as ORM;
  18. /**
  19.  * @ORM\Entity(repositoryClass="App\EntityRepo\GalleryRepo")
  20.  * @ORM\Table(name="gallery")
  21.  */
  22. class Gallery
  23. {
  24.     /**
  25.      * @ORM\Column(type="integer")
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */ 
  29.     protected $galleryId=0;
  30.     /**
  31.      * @ORM\Column(type="string", length=100)
  32.      */
  33.     protected $galleryName;
  34.     /**
  35.      * @ORM\Column(type="integer", length=100)
  36.      */    
  37.     protected $userId=0;
  38.     /**
  39.      * @ORM\Column(type="text", nullable=true)
  40.      */
  41.     protected $galleryDescription;    
  42.     
  43.     /**
  44.      * @ORM\Column(type="boolean", nullable=true)
  45.      */
  46.     protected $isPublic=true;    
  47.     
  48.     /**
  49.      * @ORM\Column(type="boolean", nullable=true)
  50.      */
  51.     protected $isWebBased=true;    
  52.     
  53.     
  54.     /**
  55.      * @ORM\Column(type="date", nullable=true)
  56.      */
  57.     protected $dateCreated;    
  58.     
  59.     /**
  60.      * @ORM\Column(type="integer")
  61.      */
  62.     protected $slideGalleryWidth=0;
  63.     
  64.     
  65.     /**
  66.      * @ORM\Column(type="integer")
  67.      */
  68.     protected $slideGalleryHeight=0;  
  69.     
  70.     /**
  71.      * @ORM\Column(type="integer")
  72.      */
  73.     protected $slideshowWidth=0;
  74.     
  75.     /**
  76.      * @ORM\Column(type="integer")
  77.      */
  78.     protected $slideshowHeight=0;    
  79.     
  80.     /**
  81.      * @ORM\Column(type="string", length=100, nullable=true)
  82.      */
  83.     protected $folderName;
  84.     
  85.     /**
  86.      * @ORM\Column(type="string", length=100, nullable=true)
  87.      */
  88.     protected $slideshowEffect;
  89.     
  90.     /**
  91.      * @ORM\Column(type="integer")
  92.      */
  93.     protected $thumbSize=0;    
  94.     
  95.     /**
  96.      * @ORM\Column(type="integer")
  97.      */
  98.     protected $isFileLock=0;
  99.     
  100.     /**
  101.      * @ORM\Column(type="integer")
  102.      */
  103.     protected $slideGalleryIsVertical=0;      
  104.     
  105.     /**
  106.      * @ORM\Column(type="integer")
  107.      */
  108.     protected $slideshowTime=0;   
  109.     /**
  110.      * @ORM\Column(type="string", length=255, nullable=true)
  111.      */
  112.     protected $galleryLogoUrl;      
  113.  
  114.      /**
  115.      * Many galleries have Many websites.
  116.      * @ORM\ManyToMany(targetEntity="GalleryWebsite",cascade={"persist"})
  117.      * @ORM\JoinTable(name="gallery_to_website",
  118.      *      joinColumns={@ORM\JoinColumn(name="gallery_id", referencedColumnName="gallery_id")},
  119.      *      inverseJoinColumns={@ORM\JoinColumn(name="gallery_website_id", referencedColumnName="gallery_website_id", unique=false)}
  120.      *      )
  121.      */
  122.     protected $websites
  123.     /**
  124.      * @ORM\Column(type="string", length=255, nullable=true)
  125.      */
  126.     protected $galleryCss;      
  127.     /**
  128.      * Get galleryId
  129.      *
  130.      * @return integer
  131.      */
  132.     public function getGalleryId()
  133.     {
  134.         return $this->galleryId;
  135.     }
  136.     /**
  137.      * Set galleryName
  138.      *
  139.      * @param string $galleryName
  140.      *
  141.      * @return Gallery
  142.      */
  143.     public function setGalleryName($galleryName)
  144.     {
  145.         $this->galleryName $galleryName;
  146.         return $this;
  147.     }
  148.     /**
  149.      * Get galleryName
  150.      *
  151.      * @return string
  152.      */
  153.     public function getGalleryName()
  154.     {
  155.         return $this->galleryName;
  156.     }
  157.     /**
  158.      * Set userId
  159.      *
  160.      * @param integer $userId
  161.      *
  162.      * @return Gallery
  163.      */
  164.     public function setUserId($userId)
  165.     {
  166.         $this->userId $userId;
  167.         return $this;
  168.     }
  169.     /**
  170.      * Get userId
  171.      *
  172.      * @return integer
  173.      */
  174.     public function getUserId()
  175.     {
  176.         return $this->userId;
  177.     }
  178.     /**
  179.      * Set galleryDescription
  180.      *
  181.      * @param string $galleryDescription
  182.      *
  183.      * @return Gallery
  184.      */
  185.     public function setGalleryDescription($galleryDescription)
  186.     {
  187.         $this->galleryDescription $galleryDescription;
  188.         return $this;
  189.     }
  190.     /**
  191.      * Get galleryDescription
  192.      *
  193.      * @return string
  194.      */
  195.     public function getGalleryDescription()
  196.     {
  197.         return $this->galleryDescription;
  198.     }
  199.     /**
  200.      * Set isPublic
  201.      *
  202.      * @param boolean $isPublic
  203.      *
  204.      * @return Gallery
  205.      */
  206.     public function setIsPublic($isPublic)
  207.     {
  208.         $this->isPublic $isPublic;
  209.         return $this;
  210.     }
  211.     /**
  212.      * Get isPublic
  213.      *
  214.      * @return boolean
  215.      */
  216.     public function getIsPublic()
  217.     {
  218.         return $this->isPublic;
  219.     }
  220.     /**
  221.      * Set isWebBased
  222.      *
  223.      * @param boolean $isWebBased
  224.      *
  225.      * @return Gallery
  226.      */
  227.     public function setIsWebBased($isWebBased)
  228.     {
  229.         $this->isWebBased $isWebBased;
  230.         return $this;
  231.     }
  232.     /**
  233.      * Get isWebBased
  234.      *
  235.      * @return boolean
  236.      */
  237.     public function getIsWebBased()
  238.     {
  239.         return $this->isWebBased;
  240.     }
  241.     /**
  242.      * Set dateCreated
  243.      *
  244.      * @param \DateTime $dateCreated
  245.      *
  246.      * @return Gallery
  247.      */
  248.     public function setDateCreated($dateCreated)
  249.     {
  250.         $this->dateCreated $dateCreated;
  251.         return $this;
  252.     }
  253.     /**
  254.      * Get dateCreated
  255.      *
  256.      * @return \DateTime
  257.      */
  258.     public function getDateCreated()
  259.     {
  260.         return $this->dateCreated;
  261.     }
  262.     /**
  263.      * Set slideGalleryWidth
  264.      *
  265.      * @param integer $slideGalleryWidth
  266.      *
  267.      * @return Gallery
  268.      */
  269.     public function setSlideGalleryWidth($slideGalleryWidth)
  270.     {
  271.         $this->slideGalleryWidth $slideGalleryWidth;
  272.         return $this;
  273.     }
  274.     /**
  275.      * Get slideGalleryWidth
  276.      *
  277.      * @return integer
  278.      */
  279.     public function getSlideGalleryWidth()
  280.     {
  281.         return $this->slideGalleryWidth;
  282.     }
  283.     /**
  284.      * Set slideGalleryHeight
  285.      *
  286.      * @param integer $slideGalleryHeight
  287.      *
  288.      * @return Gallery
  289.      */
  290.     public function setSlideGalleryHeight($slideGalleryHeight)
  291.     {
  292.         $this->slideGalleryHeight $slideGalleryHeight;
  293.         return $this;
  294.     }
  295.     /**
  296.      * Get slideGalleryHeight
  297.      *
  298.      * @return integer
  299.      */
  300.     public function getSlideGalleryHeight()
  301.     {
  302.         return $this->slideGalleryHeight;
  303.     }
  304.     /**
  305.      * Set slideshowWidth
  306.      *
  307.      * @param integer $slideshowWidth
  308.      *
  309.      * @return Gallery
  310.      */
  311.     public function setSlideshowWidth($slideshowWidth)
  312.     {
  313.         $this->slideshowWidth $slideshowWidth;
  314.         return $this;
  315.     }
  316.     /**
  317.      * Get slideshowWidth
  318.      *
  319.      * @return integer
  320.      */
  321.     public function getSlideshowWidth()
  322.     {
  323.         return $this->slideshowWidth;
  324.     }
  325.     /**
  326.      * Set slideshowHeight
  327.      *
  328.      * @param integer $slideshowHeight
  329.      *
  330.      * @return Gallery
  331.      */
  332.     public function setSlideshowHeight($slideshowHeight)
  333.     {
  334.         $this->slideshowHeight $slideshowHeight;
  335.         return $this;
  336.     }
  337.     /**
  338.      * Get slideshowHeight
  339.      *
  340.      * @return integer
  341.      */
  342.     public function getSlideshowHeight()
  343.     {
  344.         return $this->slideshowHeight;
  345.     }
  346.     /**
  347.      * Set folderName
  348.      *
  349.      * @param string $folderName
  350.      *
  351.      * @return Gallery
  352.      */
  353.     public function setFolderName($folderName)
  354.     {
  355.         $this->folderName $folderName;
  356.         return $this;
  357.     }
  358.     /**
  359.      * Get folderName
  360.      *
  361.      * @return string
  362.      */
  363.     public function getFolderName()
  364.     {
  365.         return $this->folderName;
  366.     }
  367.     /**
  368.      * Set slideshowEffect
  369.      *
  370.      * @param string $slideshowEffect
  371.      *
  372.      * @return Gallery
  373.      */
  374.     public function setSlideshowEffect($slideshowEffect)
  375.     {
  376.         $this->slideshowEffect $slideshowEffect;
  377.         return $this;
  378.     }
  379.     /**
  380.      * Get slideshowEffect
  381.      *
  382.      * @return string
  383.      */
  384.     public function getSlideshowEffect()
  385.     {
  386.         return $this->slideshowEffect;
  387.     }
  388.     /**
  389.      * Set thumbSize
  390.      *
  391.      * @param integer $thumbSize
  392.      *
  393.      * @return Gallery
  394.      */
  395.     public function setThumbSize($thumbSize)
  396.     {
  397.         $this->thumbSize $thumbSize;
  398.         return $this;
  399.     }
  400.     /**
  401.      * Get thumbSize
  402.      *
  403.      * @return integer
  404.      */
  405.     public function getThumbSize()
  406.     {
  407.         return $this->thumbSize;
  408.     }
  409.     /**
  410.      * Set isFileLock
  411.      *
  412.      * @param integer $isFileLock
  413.      *
  414.      * @return Gallery
  415.      */
  416.     public function setIsFileLock($isFileLock)
  417.     {
  418.         $this->isFileLock $isFileLock;
  419.         return $this;
  420.     }
  421.     /**
  422.      * Get isFileLock
  423.      *
  424.      * @return integer
  425.      */
  426.     public function getIsFileLock()
  427.     {
  428.         return $this->isFileLock;
  429.     }
  430.     /**
  431.      * Set slideGalleryIsVertical
  432.      *
  433.      * @param integer $slideGalleryIsVertical
  434.      *
  435.      * @return Gallery
  436.      */
  437.     public function setSlideGalleryIsVertical($slideGalleryIsVertical)
  438.     {
  439.         $this->slideGalleryIsVertical $slideGalleryIsVertical;
  440.         return $this;
  441.     }
  442.     /**
  443.      * Get slideGalleryIsVertical
  444.      *
  445.      * @return integer
  446.      */
  447.     public function getSlideGalleryIsVertical()
  448.     {
  449.         return $this->slideGalleryIsVertical;
  450.     }
  451.     /**
  452.      * Set slideshowTime
  453.      *
  454.      * @param integer $slideshowTime
  455.      *
  456.      * @return Gallery
  457.      */
  458.     public function setSlideshowTime($slideshowTime)
  459.     {
  460.         $this->slideshowTime $slideshowTime;
  461.         return $this;
  462.     }
  463.     /**
  464.      * Get slideshowTime
  465.      *
  466.      * @return integer
  467.      */
  468.     public function getSlideshowTime()
  469.     {
  470.         return $this->slideshowTime;
  471.     }
  472.     /**
  473.      * Set galleryLogoUrl
  474.      *
  475.      * @param string $galleryLogoUrl
  476.      *
  477.      * @return Gallery
  478.      */
  479.     public function setGalleryLogoUrl($galleryLogoUrl)
  480.     {
  481.         $this->galleryLogoUrl $galleryLogoUrl;
  482.         return $this;
  483.     }
  484.     /**
  485.      * Get galleryLogoUrl
  486.      *
  487.      * @return string
  488.      */
  489.     public function getGalleryLogoUrl()
  490.     {
  491.         return $this->galleryLogoUrl;
  492.     }
  493.     /**
  494.      * Constructor
  495.      */
  496.     public function __construct()
  497.     {
  498.         $this->websites = new \Doctrine\Common\Collections\ArrayCollection();
  499.     }
  500.     /**
  501.      * Add website
  502.      *
  503.      * @param \App\Entity\GalleryWebsite $website
  504.      *
  505.      * @return Gallery
  506.      */
  507.     public function addWebsite(\App\Entity\GalleryWebsite $website)
  508.     {
  509.         $this->websites[] = $website;
  510.         return $this;
  511.     }
  512.     /**
  513.      * Remove website
  514.      *
  515.      * @param \App\Entity\GalleryWebsite $website
  516.      */
  517.     public function removeWebsite(\App\Entity\GalleryWebsite $website)
  518.     {
  519.         $this->websites->removeElement($website);
  520.     }
  521.     /**
  522.      * Get websites
  523.      *
  524.      * @return \Doctrine\Common\Collections\Collection
  525.      */
  526.     public function getWebsites()
  527.     {
  528.         return $this->websites;
  529.     }
  530.     /**
  531.      * Set galleryCss
  532.      *
  533.      * @param string $galleryCss
  534.      *
  535.      * @return Gallery
  536.      */
  537.     public function setGalleryCss($galleryCss)
  538.     {
  539.         $this->galleryCss $galleryCss;
  540.         return $this;
  541.     }
  542.     /**
  543.      * Get galleryCss
  544.      *
  545.      * @return string
  546.      */
  547.     public function getGalleryCss()
  548.     {
  549.         return $this->galleryCss;
  550.     }
  551.     public function isIsPublic(): ?bool
  552.     {
  553.         return $this->isPublic;
  554.     }
  555.     public function isIsWebBased(): ?bool
  556.     {
  557.         return $this->isWebBased;
  558.     }
  559. }