<?php
namespace Aviatur\EditionBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* HomePromoList.
*
* @ORM\Table(name="home_promo_list")
* @ORM\Entity(repositoryClass="Aviatur\EditionBundle\Entity\HomePromoListRepository")
*/
class HomePromoList
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="type", type="string", length=255)
*/
private $type;
/**
* @var string
*
* @ORM\Column(name="conditions", type="text", nullable=true)
*/
private $conditions;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
private $title;
/**
* @var string
*
* @ORM\Column(name="subtitle", type="string", length=255, nullable=true)
*/
private $subtitle;
/**
* @var string
*
* @ORM\Column(name="image", type="string", length=255, nullable=true)
*/
private $image;
/**
* @var bool
*
* @ORM\Column(name="online", type="boolean")
*/
private $online;
/**
* @ORM\OneToMany(targetEntity="Aviatur\EditionBundle\Entity\HomePromo", mappedBy="homePromoList", cascade={"all"})
*/
private $homePromo;
/**
* @ORM\OneToOne(targetEntity="Aviatur\EditionBundle\Entity\HomePromoTime", mappedBy="homePromoList", cascade={"all"})
*/
private ?\Aviatur\EditionBundle\Entity\HomePromoTime $homePromoTime = null;
/**
* @var \Agency
*
* @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency", inversedBy="homePromoList")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
* })
*/
private $agency;
/**
* Constructor.
*/
public function __construct()
{
$this->homePromo = new \Doctrine\Common\Collections\ArrayCollection();
}
public function __toString()
{
return $this->type .' - '. $this->id;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set type.
*
* @param string $type
*
* @return HomePromoList
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Get type.
*
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Set conditions.
*
* @param string $conditions
*
* @return HomePromoList
*/
public function setConditions($conditions)
{
$this->conditions = $conditions;
return $this;
}
/**
* Get conditions.
*
* @return string
*/
public function getConditions()
{
return $this->conditions;
}
/**
* Set online.
*
* @param bool $online
*
* @return HomePromoList
*/
public function setOnline($online)
{
$this->online = $online;
return $this;
}
/**
* Get online.
*
* @return bool
*/
public function getOnline()
{
return $this->online;
}
/**
* Add homePromo.
*
* @return HomePromoList
*/
public function addHomePromo(\Aviatur\EditionBundle\Entity\HomePromo $homePromo)
{
$this->homePromo[] = $homePromo;
return $this;
}
/**
* Remove homePromo.
*/
public function removeHomePromo(\Aviatur\EditionBundle\Entity\HomePromo $homePromo)
{
$this->homePromo->removeElement($homePromo);
}
/**
* Get homePromo.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getHomePromo()
{
return $this->homePromo;
}
/**
* Set homePromoTime.
*
* @param \Aviatur\EditionBundle\Entity\HomePromoTime $homePromoTime
*
* @return HomePromoList
*/
public function setHomePromoTime(\Aviatur\EditionBundle\Entity\HomePromoTime $homePromoTime = null)
{
$this->homePromoTime = $homePromoTime;
return $this;
}
/**
* Get homePromoTime.
*
* @return \Aviatur\EditionBundle\Entity\HomePromoTime
*/
public function getHomePromoTime()
{
return $this->homePromoTime;
}
/**
* Set agency.
*
* @param \Aviatur\AgencyBundle\Entity\Agency $agency
*
* @return HomePromoList
*/
public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency = null)
{
$this->agency = $agency;
return $this;
}
/**
* Get agency.
*
* @return \Aviatur\AgencyBundle\Entity\Agency
*/
public function getAgency()
{
return $this->agency;
}
/**
* Set title.
*
* @param string $title
*
* @return HomePromoList
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title.
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set image.
*
* @param string $image
*
* @return HomePromoList
*/
public function setImage($image)
{
$this->image = $image;
return $this;
}
/**
* Get image.
*
* @return string
*/
public function getImage()
{
return $this->image;
}
/**
* Set subtitle.
*
* @param string $subtitle
*
* @return HomePromoList
*/
public function setSubtitle($subtitle)
{
$this->subtitle = $subtitle;
return $this;
}
/**
* Get subtitle.
*
* @return string
*/
public function getSubtitle()
{
return $this->subtitle;
}
}