* Fertigstellung Buchungsformular (#1321) (SternTours-CRM-API-Anbindung, Mailversand, Validierung, Dynamische Preisberechnung, Persistierung von Buchungsinformationen)
* Fehler bei der Preisberechnung behoben * Farbschema geändert (Kevin Adametz) git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3289 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
dde3b91724
commit
3a28866cd2
36 changed files with 2200 additions and 268 deletions
|
|
@ -7,10 +7,20 @@
|
|||
namespace AppBundle\Entity;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use AppBundle\Validator\Constraints as AppBundleAssert;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
/**
|
||||
* Class BookingRequest
|
||||
* @package AppBundle\Entity
|
||||
* @AppBundleAssert\BookingRequest
|
||||
*/
|
||||
class BookingRequest
|
||||
{
|
||||
// Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler)
|
||||
const MR = 1;
|
||||
const MRS = 2;
|
||||
|
||||
/**
|
||||
* @var TravelDeparturePoint $departure
|
||||
*/
|
||||
|
|
@ -23,14 +33,78 @@ class BookingRequest
|
|||
*/
|
||||
private $insurance;
|
||||
|
||||
private $comfort;
|
||||
private $comfort = false;
|
||||
|
||||
private $travelOptions;
|
||||
private $travelOptions = [];
|
||||
|
||||
private $salutation;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $firstName;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $lastName;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $streetAddress;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $zipCode;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $city;
|
||||
|
||||
private $nation;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $phone;
|
||||
|
||||
private $fax;
|
||||
|
||||
/**
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
private $email;
|
||||
|
||||
/*
|
||||
* @ Assert\Valid()
|
||||
*/
|
||||
private $travelers = [];
|
||||
|
||||
private $notes;
|
||||
|
||||
/**
|
||||
* @Assert\IsTrue()
|
||||
*/
|
||||
private $acceptTerms = false;
|
||||
|
||||
/**
|
||||
* BookingRequest constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
for ($i = 0; $i < 4; ++$i)
|
||||
{
|
||||
$this->travelers[] = new Traveler();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TravelDeparturePoint
|
||||
*/
|
||||
public function getDeparture(): TravelDeparturePoint
|
||||
public function getDeparture()
|
||||
{
|
||||
return $this->departure;
|
||||
}
|
||||
|
|
@ -62,7 +136,7 @@ class BookingRequest
|
|||
/**
|
||||
* @return TravelInsurance
|
||||
*/
|
||||
public function getInsurance(): TravelInsurance
|
||||
public function getInsurance()
|
||||
{
|
||||
return $this->insurance;
|
||||
}
|
||||
|
|
@ -92,7 +166,7 @@ class BookingRequest
|
|||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @return TravelOption[]
|
||||
*/
|
||||
public function getTravelOptions()
|
||||
{
|
||||
|
|
@ -107,6 +181,221 @@ class BookingRequest
|
|||
$this->travelOptions = $travelOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSalutation()
|
||||
{
|
||||
return $this->salutation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $salutation
|
||||
*/
|
||||
public function setSalutation($salutation)
|
||||
{
|
||||
$this->salutation = $salutation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFirstName()
|
||||
{
|
||||
return $this->firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $firstName
|
||||
*/
|
||||
public function setFirstName($firstName)
|
||||
{
|
||||
$this->firstName = $firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLastName()
|
||||
{
|
||||
return $this->lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $lastName
|
||||
*/
|
||||
public function setLastName($lastName)
|
||||
{
|
||||
$this->lastName = $lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getStreetAddress()
|
||||
{
|
||||
return $this->streetAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $streetAddress
|
||||
*/
|
||||
public function setStreetAddress($streetAddress)
|
||||
{
|
||||
$this->streetAddress = $streetAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getZipCode()
|
||||
{
|
||||
return $this->zipCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $zipCode
|
||||
*/
|
||||
public function setZipCode($zipCode)
|
||||
{
|
||||
$this->zipCode = $zipCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCity()
|
||||
{
|
||||
return $this->city;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $city
|
||||
*/
|
||||
public function setCity($city)
|
||||
{
|
||||
$this->city = $city;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getNation()
|
||||
{
|
||||
return $this->nation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $nation
|
||||
*/
|
||||
public function setNation($nation)
|
||||
{
|
||||
$this->nation = $nation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPhone()
|
||||
{
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phone
|
||||
*/
|
||||
public function setPhone($phone)
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFax()
|
||||
{
|
||||
return $this->fax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fax
|
||||
*/
|
||||
public function setFax($fax)
|
||||
{
|
||||
$this->fax = $fax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $email
|
||||
*/
|
||||
public function setEmail($email)
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Traveler[]
|
||||
*/
|
||||
public function getTravelers()
|
||||
{
|
||||
return $this->travelers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Traveler[] $travelers
|
||||
*/
|
||||
public function setTravelers($travelers)
|
||||
{
|
||||
$this->travelers = $travelers;
|
||||
}
|
||||
|
||||
/*
|
||||
public function addTraveler(Traveler $traveler)
|
||||
{
|
||||
$this->travelers[] = $traveler;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getNotes()
|
||||
{
|
||||
return $this->notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $notes
|
||||
*/
|
||||
public function setNotes($notes)
|
||||
{
|
||||
$this->notes = $notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isAcceptTerms()
|
||||
{
|
||||
return $this->acceptTerms;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $acceptTerms
|
||||
*/
|
||||
public function setAcceptTerms($acceptTerms)
|
||||
{
|
||||
$this->acceptTerms = $acceptTerms;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue