src/Notaris/AdminBundle/Entity/Image.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: lisavandaele
  5.  * Date: 30/01/15
  6.  * Time: 12:53
  7.  */
  8. namespace Notaris\AdminBundle\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. /**
  12.  * @ORM\Entity(repositoryClass="ImageRepository")
  13.  * @ORM\Table(name="image",uniqueConstraints={
  14.  *     @ORM\UniqueConstraint(name="unique_filename", columns={"filename","locale"})})
  15.  */
  16. class Image {
  17.     /**
  18.      * @var integer
  19.      *
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @var string
  27.      *
  28.      * @ORM\Column(name="filename", type="string", length=255)
  29.      */
  30.     private $filename;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="caption", type="string", length=255, nullable=true)
  35.      */
  36.     private $caption;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="alt", type="string", length=255, nullable=true)
  41.      */
  42.     private $alt;
  43.     /**
  44.      * @var string
  45.      *
  46.      * @ORM\Column(name="url", type="string", length=255, nullable=true)
  47.      */
  48.     private $url;
  49.     /**
  50.      * @var string
  51.      *
  52.      * @ORM\Column(name="locale", type="string", length=5)
  53.      */
  54.     private $locale;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\User")
  57.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
  58.      */
  59.     private $user;
  60.     /**
  61.      * @ORM\Column(type="boolean", name="is_full", nullable=true)
  62.      */
  63.     private $isFull;
  64.     /**
  65.      * @Gedmo\Timestampable(on="create")
  66.      * @ORM\Column(name="created", type="datetime")
  67.      */
  68.     protected $created;
  69.     /**
  70.      * Get id
  71.      *
  72.      * @return integer 
  73.      */
  74.     public function getId()
  75.     {
  76.         return $this->id;
  77.     }
  78.     /**
  79.      * Set filename
  80.      *
  81.      * @param string $filename
  82.      * @return Image
  83.      */
  84.     public function setFilename($filename)
  85.     {
  86.         $this->filename = $filename;
  87.         return $this;
  88.     }
  89.     /**
  90.      * Get filename
  91.      *
  92.      * @return string 
  93.      */
  94.     public function getFilename()
  95.     {
  96.         return $this->filename;
  97.     }
  98.     /**
  99.      * Set caption
  100.      *
  101.      * @param string $caption
  102.      * @return Image
  103.      */
  104.     public function setCaption($caption)
  105.     {
  106.         $this->caption = $caption;
  107.         return $this;
  108.     }
  109.     /**
  110.      * Get caption
  111.      *
  112.      * @return string 
  113.      */
  114.     public function getCaption()
  115.     {
  116.         return $this->caption;
  117.     }
  118.     /**
  119.      * Set alt
  120.      *
  121.      * @param string $alt
  122.      * @return Image
  123.      */
  124.     public function setAlt($alt)
  125.     {
  126.         $this->alt = $alt;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get alt
  131.      *
  132.      * @return string
  133.      */
  134.     public function getAlt()
  135.     {
  136.         return $this->alt;
  137.     }
  138.     /**
  139.      * Set locale
  140.      *
  141.      * @param string $locale
  142.      * @return Image
  143.      */
  144.     public function setLocale($locale)
  145.     {
  146.         $this->locale = $locale;
  147.         return $this;
  148.     }
  149.     /**
  150.      * Get locale
  151.      *
  152.      * @return string 
  153.      */
  154.     public function getLocale()
  155.     {
  156.         return $this->locale;
  157.     }
  158.     /**
  159.      * Set user
  160.      *
  161.      * @param \Notaris\AdminBundle\Entity\User $user
  162.      * @return Image
  163.      */
  164.     public function setUser(\Notaris\AdminBundle\Entity\User $user = null)
  165.     {
  166.         $this->user = $user;
  167.         return $this;
  168.     }
  169.     /**
  170.      * Get user
  171.      *
  172.      * @return \Notaris\AdminBundle\Entity\User 
  173.      */
  174.     public function getUser()
  175.     {
  176.         return $this->user;
  177.     }
  178.     /**
  179.      * Set created
  180.      *
  181.      * @param \DateTime $created
  182.      * @return Image
  183.      */
  184.     public function setCreated($created)
  185.     {
  186.         $this->created = $created;
  187.         return $this;
  188.     }
  189.     /**
  190.      * Get created
  191.      *
  192.      * @return \DateTime 
  193.      */
  194.     public function getCreated()
  195.     {
  196.         return $this->created;
  197.     }
  198.     /**
  199.      * Set subsiteModule
  200.      *
  201.      * @param \Notaris\AdminBundle\Entity\SubsiteModule $subsiteModule
  202.      * @return Image
  203.      */
  204.     public function setSubsiteModule(\Notaris\AdminBundle\Entity\SubsiteModule $subsiteModule = null)
  205.     {
  206.         $this->subsiteModule = $subsiteModule;
  207.         return $this;
  208.     }
  209.     /**
  210.      * Get subsiteModule
  211.      *
  212.      * @return \Notaris\AdminBundle\Entity\SubsiteModule 
  213.      */
  214.     public function getSubsiteModule()
  215.     {
  216.         return $this->subsiteModule;
  217.     }
  218.     /**
  219.      * Set url
  220.      *
  221.      * @param string $url
  222.      *
  223.      * @return Image
  224.      */
  225.     public function setUrl($url)
  226.     {
  227.         $this->url = $url;
  228.         return $this;
  229.     }
  230.     /**
  231.      * Get url
  232.      *
  233.      * @return string
  234.      */
  235.     public function getUrl()
  236.     {
  237.         return $this->url;
  238.     }
  239.     /**
  240.      * Set isFull
  241.      *
  242.      * @param boolean $isFull
  243.      *
  244.      * @return Image
  245.      */
  246.     public function setIsFull($isFull)
  247.     {
  248.         $this->isFull = $isFull;
  249.         return $this;
  250.     }
  251.     /**
  252.      * Get isFull
  253.      *
  254.      * @return boolean
  255.      */
  256.     public function getIsFull()
  257.     {
  258.         return $this->isFull;
  259.     }
  260. }