src/Notaris/AdminBundle/Entity/Link.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. use Symfony\Component\Validator\Constraints as Assert;
  12. /**
  13.  * @ORM\Entity(repositoryClass="LinkRepository")
  14.  * @ORM\Table(name="link")
  15.  */
  16. class Link {
  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="url", type="string", length=255)
  29.      */
  30.     private $url;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  35.      */
  36.     private $title;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="locale", type="string", length=5)
  41.      */
  42.     private $locale;
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\User")
  45.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
  46.      */
  47.     private $user;
  48.     /**
  49.      * @Gedmo\Timestampable(on="create")
  50.      * @ORM\Column(name="created", type="datetime")
  51.      */
  52.     private $created;
  53.     /**
  54.      * @ORM\Column(type="boolean", name="new_window")
  55.      * @Assert\Type("boolean")
  56.      */
  57.     private $newWindow;
  58.     /**
  59.      * Get id
  60.      *
  61.      * @return integer 
  62.      */
  63.     public function getId()
  64.     {
  65.         return $this->id;
  66.     }
  67.     /**
  68.      * Set url
  69.      *
  70.      * @param string $url
  71.      * @return Link
  72.      */
  73.     public function setUrl($url)
  74.     {
  75.         $this->url = $url;
  76.         return $this;
  77.     }
  78.     /**
  79.      * Get url
  80.      *
  81.      * @return string 
  82.      */
  83.     public function getUrl()
  84.     {
  85.         return $this->url;
  86.     }
  87.     /**
  88.      * Set title
  89.      *
  90.      * @param string $title
  91.      * @return Link
  92.      */
  93.     public function setTitle($title)
  94.     {
  95.         $this->title = $title;
  96.         return $this;
  97.     }
  98.     /**
  99.      * Get title
  100.      *
  101.      * @return string 
  102.      */
  103.     public function getTitle()
  104.     {
  105.         return $this->title;
  106.     }
  107.     /**
  108.      * Set locale
  109.      *
  110.      * @param string $locale
  111.      * @return Link
  112.      */
  113.     public function setLocale($locale)
  114.     {
  115.         $this->locale = $locale;
  116.         return $this;
  117.     }
  118.     /**
  119.      * Get locale
  120.      *
  121.      * @return string 
  122.      */
  123.     public function getLocale()
  124.     {
  125.         return $this->locale;
  126.     }
  127.     /**
  128.      * Set created
  129.      *
  130.      * @param \DateTime $created
  131.      * @return Link
  132.      */
  133.     public function setCreated($created)
  134.     {
  135.         $this->created = $created;
  136.         return $this;
  137.     }
  138.     /**
  139.      * Get created
  140.      *
  141.      * @return \DateTime 
  142.      */
  143.     public function getCreated()
  144.     {
  145.         return $this->created;
  146.     }
  147.     /**
  148.      * Set user
  149.      *
  150.      * @param \Notaris\AdminBundle\Entity\User $user
  151.      * @return Link
  152.      */
  153.     public function setUser(\Notaris\AdminBundle\Entity\User $user = null)
  154.     {
  155.         $this->user = $user;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Get user
  160.      *
  161.      * @return \Notaris\AdminBundle\Entity\User 
  162.      */
  163.     public function getUser()
  164.     {
  165.         return $this->user;
  166.     }
  167.     /**
  168.      * Set newWindow
  169.      *
  170.      * @param boolean $newWindow
  171.      * @return Link
  172.      */
  173.     public function setNewWindow($newWindow)
  174.     {
  175.         $this->newWindow = $newWindow;
  176.         return $this;
  177.     }
  178.     /**
  179.      * Get newWindow
  180.      *
  181.      * @return boolean 
  182.      */
  183.     public function getNewWindow()
  184.     {
  185.         return $this->newWindow;
  186.     }
  187. }