src/Aviatur/EditionBundle/Entity/HomePromoList.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\EditionBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * HomePromoList.
  6.  *
  7.  * @ORM\Table(name="home_promo_list")
  8.  * @ORM\Entity(repositoryClass="Aviatur\EditionBundle\Entity\HomePromoListRepository")
  9.  */
  10. class HomePromoList
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="type", type="string", length=255)
  24.      */
  25.     private $type;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="conditions", type="text", nullable=true)
  30.      */
  31.     private $conditions;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  36.      */
  37.     private $title;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="subtitle", type="string", length=255, nullable=true)
  42.      */
  43.     private $subtitle;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="image", type="string", length=255, nullable=true)
  48.      */
  49.     private $image;
  50.     /**
  51.      * @var bool
  52.      *
  53.      * @ORM\Column(name="online", type="boolean")
  54.      */
  55.     private $online;
  56.     /**
  57.      * @ORM\OneToMany(targetEntity="Aviatur\EditionBundle\Entity\HomePromo", mappedBy="homePromoList", cascade={"all"})
  58.      */
  59.     private $homePromo;
  60.     /**
  61.      * @ORM\OneToOne(targetEntity="Aviatur\EditionBundle\Entity\HomePromoTime", mappedBy="homePromoList", cascade={"all"})
  62.      */
  63.     private ?\Aviatur\EditionBundle\Entity\HomePromoTime $homePromoTime null;
  64.     /**
  65.      * @var \Agency
  66.      *
  67.      * @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency", inversedBy="homePromoList")
  68.      * @ORM\JoinColumns({
  69.      *   @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
  70.      * })
  71.      */
  72.     private $agency;
  73.     /**
  74.      * Constructor.
  75.      */
  76.     public function __construct()
  77.     {
  78.         $this->homePromo = new \Doctrine\Common\Collections\ArrayCollection();
  79.     }
  80.     public function __toString()
  81.     {
  82.         return $this->type .' - '$this->id;
  83.     }
  84.     /**
  85.      * Get id.
  86.      *
  87.      * @return int
  88.      */
  89.     public function getId()
  90.     {
  91.         return $this->id;
  92.     }
  93.     /**
  94.      * Set type.
  95.      *
  96.      * @param string $type
  97.      *
  98.      * @return HomePromoList
  99.      */
  100.     public function setType($type)
  101.     {
  102.         $this->type $type;
  103.         return $this;
  104.     }
  105.     /**
  106.      * Get type.
  107.      *
  108.      * @return string
  109.      */
  110.     public function getType()
  111.     {
  112.         return $this->type;
  113.     }
  114.     /**
  115.      * Set conditions.
  116.      *
  117.      * @param string $conditions
  118.      *
  119.      * @return HomePromoList
  120.      */
  121.     public function setConditions($conditions)
  122.     {
  123.         $this->conditions $conditions;
  124.         return $this;
  125.     }
  126.     /**
  127.      * Get conditions.
  128.      *
  129.      * @return string
  130.      */
  131.     public function getConditions()
  132.     {
  133.         return $this->conditions;
  134.     }
  135.     /**
  136.      * Set online.
  137.      *
  138.      * @param bool $online
  139.      *
  140.      * @return HomePromoList
  141.      */
  142.     public function setOnline($online)
  143.     {
  144.         $this->online $online;
  145.         return $this;
  146.     }
  147.     /**
  148.      * Get online.
  149.      *
  150.      * @return bool
  151.      */
  152.     public function getOnline()
  153.     {
  154.         return $this->online;
  155.     }
  156.     /**
  157.      * Add homePromo.
  158.      *
  159.      * @return HomePromoList
  160.      */
  161.     public function addHomePromo(\Aviatur\EditionBundle\Entity\HomePromo $homePromo)
  162.     {
  163.         $this->homePromo[] = $homePromo;
  164.         return $this;
  165.     }
  166.     /**
  167.      * Remove homePromo.
  168.      */
  169.     public function removeHomePromo(\Aviatur\EditionBundle\Entity\HomePromo $homePromo)
  170.     {
  171.         $this->homePromo->removeElement($homePromo);
  172.     }
  173.     /**
  174.      * Get homePromo.
  175.      *
  176.      * @return \Doctrine\Common\Collections\Collection
  177.      */
  178.     public function getHomePromo()
  179.     {
  180.         return $this->homePromo;
  181.     }
  182.     /**
  183.      * Set homePromoTime.
  184.      *
  185.      * @param \Aviatur\EditionBundle\Entity\HomePromoTime $homePromoTime
  186.      *
  187.      * @return HomePromoList
  188.      */
  189.     public function setHomePromoTime(\Aviatur\EditionBundle\Entity\HomePromoTime $homePromoTime null)
  190.     {
  191.         $this->homePromoTime $homePromoTime;
  192.         return $this;
  193.     }
  194.     /**
  195.      * Get homePromoTime.
  196.      *
  197.      * @return \Aviatur\EditionBundle\Entity\HomePromoTime
  198.      */
  199.     public function getHomePromoTime()
  200.     {
  201.         return $this->homePromoTime;
  202.     }
  203.     /**
  204.      * Set agency.
  205.      *
  206.      * @param \Aviatur\AgencyBundle\Entity\Agency $agency
  207.      *
  208.      * @return HomePromoList
  209.      */
  210.     public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency null)
  211.     {
  212.         $this->agency $agency;
  213.         return $this;
  214.     }
  215.     /**
  216.      * Get agency.
  217.      *
  218.      * @return \Aviatur\AgencyBundle\Entity\Agency
  219.      */
  220.     public function getAgency()
  221.     {
  222.         return $this->agency;
  223.     }
  224.     /**
  225.      * Set title.
  226.      *
  227.      * @param string $title
  228.      *
  229.      * @return HomePromoList
  230.      */
  231.     public function setTitle($title)
  232.     {
  233.         $this->title $title;
  234.         return $this;
  235.     }
  236.     /**
  237.      * Get title.
  238.      *
  239.      * @return string
  240.      */
  241.     public function getTitle()
  242.     {
  243.         return $this->title;
  244.     }
  245.     /**
  246.      * Set image.
  247.      *
  248.      * @param string $image
  249.      *
  250.      * @return HomePromoList
  251.      */
  252.     public function setImage($image)
  253.     {
  254.         $this->image $image;
  255.         return $this;
  256.     }
  257.     /**
  258.      * Get image.
  259.      *
  260.      * @return string
  261.      */
  262.     public function getImage()
  263.     {
  264.         return $this->image;
  265.     }
  266.     /**
  267.      * Set subtitle.
  268.      *
  269.      * @param string $subtitle
  270.      *
  271.      * @return HomePromoList
  272.      */
  273.     public function setSubtitle($subtitle)
  274.     {
  275.         $this->subtitle $subtitle;
  276.         return $this;
  277.     }
  278.     /**
  279.      * Get subtitle.
  280.      *
  281.      * @return string
  282.      */
  283.     public function getSubtitle()
  284.     {
  285.         return $this->subtitle;
  286.     }
  287. }