src/IUTUDC/WebsiteBundle/Entity/SliderItem.php line 14

Open in your IDE?
  1. <?php
  2. namespace IUTUDC\WebsiteBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * SliderItem
  7.  *
  8.  * @ORM\Table(name="iutudc_websitebundle_slider_items")
  9.  * @ORM\Entity(repositoryClass="IUTUDC\WebsiteBundle\Repository\SliderItemRepository")
  10.  */
  11. class SliderItem extends \Kunstmaan\AdminBundle\Entity\AbstractEntity
  12. {
  13.     /**
  14.      * @var string
  15.      *
  16.      * @ORM\Column(name="text", type="text", nullable=false)
  17.      */
  18.     private $text;
  19.     /**
  20.      * @var string|null
  21.      *
  22.      * @ORM\Column(name="image_alt_text", type="text", nullable=true)
  23.      */
  24.     private $imageAltText;
  25.     /**
  26.      * @var \Kunstmaan\MediaBundle\Entity\Media
  27.      *
  28.      * @ORM\ManyToOne(targetEntity="Kunstmaan\MediaBundle\Entity\Media")
  29.      * @ORM\JoinColumns({
  30.      *   @ORM\JoinColumn(name="image_id", referencedColumnName="id")
  31.      * })
  32.      */
  33.     private $image;
  34.     
  35.     /**
  36.      * @var \IUTUDC\WebsiteBundle\Entity\SliderConfig
  37.      *
  38.      * @ORM\ManyToOne(targetEntity="\IUTUDC\WebsiteBundle\Entity\SliderConfig", inversedBy="sliderItems")
  39.      * @ORM\JoinColumn(nullable=false)
  40.      * @Assert\NotNull()
  41.      */
  42.     private $sliderConfig;
  43.     /**
  44.      * Set text.
  45.      *
  46.      * @param string $text
  47.      *
  48.      * @return SliderItem
  49.      */
  50.     public function setText($text)
  51.     {
  52.         $this->text $text;
  53.         return $this;
  54.     }
  55.     /**
  56.      * Get text.
  57.      *
  58.      * @return string
  59.      */
  60.     public function getText()
  61.     {
  62.         return $this->text;
  63.     }
  64.     /**
  65.      * Set imageAltText.
  66.      *
  67.      * @param string|null $imageAltText
  68.      *
  69.      * @return SliderItem
  70.      */
  71.     public function setImageAltText($imageAltText null)
  72.     {
  73.         $this->imageAltText $imageAltText;
  74.         return $this;
  75.     }
  76.     /**
  77.      * Get imageAltText.
  78.      *
  79.      * @return string|null
  80.      */
  81.     public function getImageAltText()
  82.     {
  83.         return $this->imageAltText;
  84.     }
  85.     /**
  86.      * Set image.
  87.      *
  88.      * @param \Kunstmaan\MediaBundle\Entity\Media|null $image
  89.      *
  90.      * @return SliderItem
  91.      */
  92.     public function setImage(\Kunstmaan\MediaBundle\Entity\Media $image null)
  93.     {
  94.         $this->image $image;
  95.         return $this;
  96.     }
  97.     /**
  98.      * Get image.
  99.      *
  100.      * @return \Kunstmaan\MediaBundle\Entity\Media|null
  101.      */
  102.     public function getImage()
  103.     {
  104.         return $this->image;
  105.     }
  106.     /**
  107.      * @param \IUTUDC\WebsiteBundle\Entity\SliderConfig $sliderConfig
  108.      */
  109.     public function setSliderConfig(\IUTUDC\WebsiteBundle\Entity\SliderConfig $sliderConfig)
  110.     {
  111.         $this->sliderConfig $sliderConfig;
  112.     }
  113.     /**
  114.      * @return \IUTUDC\WebsiteBundle\Entity\SliderConfig
  115.      */
  116.     public function getSliderConfig()
  117.     {
  118.         return $this->sliderConfig;
  119.     }
  120. }