git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3394 f459cee4-fb09-11de-96c3-f9c5f16c3c76
254 lines
4.8 KiB
PHP
254 lines
4.8 KiB
PHP
<?php
|
|
|
|
namespace AppBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* TravelCountry
|
|
*
|
|
* @ORM\Table(name="travel_country", indexes={@ORM\Index(name="FK_travel_country_page", columns={"feedback_page_id"})})
|
|
* @ORM\Entity
|
|
*/
|
|
class TravelCountry
|
|
{
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="name", type="string", length=255, nullable=true)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="html_information", type="text", length=65535, nullable=false)
|
|
*/
|
|
private $htmlInformation;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="entry_requirements", type="text", length=65535, nullable=false)
|
|
*/
|
|
private $entryRequirements;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="IDENTITY")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var \AppBundle\Entity\Page
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Page")
|
|
* @ORM\JoinColumns({
|
|
* @ORM\JoinColumn(name="feedback_page_id", referencedColumnName="id")
|
|
* })
|
|
*/
|
|
private $feedbackPage;
|
|
|
|
/**
|
|
* @ORM\ManyToMany(targetEntity="AppBundle\Entity\TravelProgram", mappedBy="countries")
|
|
*/
|
|
private $programs;
|
|
|
|
/**
|
|
* @ORM\OneToMany(targetEntity="AppBundle\Entity\TravelDestination", mappedBy="country")
|
|
*/
|
|
private $destinations;
|
|
|
|
|
|
|
|
/**
|
|
* Set name
|
|
*
|
|
* @param string $name
|
|
*
|
|
* @return TravelCountry
|
|
*/
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Set htmlInformation
|
|
*
|
|
* @param string $htmlInformation
|
|
*
|
|
* @return TravelCountry
|
|
*/
|
|
public function setHtmlInformation($htmlInformation)
|
|
{
|
|
$this->htmlInformation = $htmlInformation;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get htmlInformation
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getHtmlInformation()
|
|
{
|
|
return $this->htmlInformation;
|
|
}
|
|
|
|
/**
|
|
* Set entryRequirements
|
|
*
|
|
* @param string $entryRequirements
|
|
*
|
|
* @return TravelCountry
|
|
*/
|
|
public function setEntryRequirements($entryRequirements)
|
|
{
|
|
$this->entryRequirements = $entryRequirements;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get entryRequirements
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getEntryRequirements()
|
|
{
|
|
return $this->entryRequirements;
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set feedbackPage
|
|
*
|
|
* @param \AppBundle\Entity\Page $feedbackPage
|
|
*
|
|
* @return TravelCountry
|
|
*/
|
|
public function setFeedbackPage(\AppBundle\Entity\Page $feedbackPage = null)
|
|
{
|
|
$this->feedbackPage = $feedbackPage;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get feedbackPage
|
|
*
|
|
* @return \AppBundle\Entity\Page
|
|
*/
|
|
public function getFeedbackPage()
|
|
{
|
|
return $this->feedbackPage;
|
|
}
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->programs = new \Doctrine\Common\Collections\ArrayCollection();
|
|
}
|
|
|
|
/**
|
|
* Add program
|
|
*
|
|
* @param \AppBundle\Entity\TravelProgram $program
|
|
*
|
|
* @return TravelCountry
|
|
*/
|
|
public function addProgram(\AppBundle\Entity\TravelProgram $program)
|
|
{
|
|
$this->programs[] = $program;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Remove program
|
|
*
|
|
* @param \AppBundle\Entity\TravelProgram $program
|
|
*/
|
|
public function removeProgram(\AppBundle\Entity\TravelProgram $program)
|
|
{
|
|
$this->programs->removeElement($program);
|
|
}
|
|
|
|
/**
|
|
* Get programs
|
|
*
|
|
* @return \Doctrine\Common\Collections\Collection
|
|
*/
|
|
public function getPrograms()
|
|
{
|
|
return $this->programs;
|
|
}
|
|
|
|
function __toString()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Add destination
|
|
*
|
|
* @param \AppBundle\Entity\TravelDestination $destination
|
|
*
|
|
* @return TravelCountry
|
|
*/
|
|
public function addDestination(\AppBundle\Entity\TravelDestination $destination)
|
|
{
|
|
$this->destinations[] = $destination;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Remove destination
|
|
*
|
|
* @param \AppBundle\Entity\TravelDestination $destination
|
|
*/
|
|
public function removeDestination(\AppBundle\Entity\TravelDestination $destination)
|
|
{
|
|
$this->destinations->removeElement($destination);
|
|
}
|
|
|
|
/**
|
|
* Get destinations
|
|
*
|
|
* @return \Doctrine\Common\Collections\Collection
|
|
*/
|
|
public function getDestinations()
|
|
{
|
|
return $this->destinations;
|
|
}
|
|
}
|