remove Room Validation
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3453 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
0eac480ad5
commit
0325e97509
1 changed files with 29 additions and 2 deletions
|
|
@ -39,15 +39,35 @@ class BookingRequestValidator extends ConstraintValidator
|
|||
public function validate($bookingRequest, Constraint $constraint)
|
||||
{
|
||||
|
||||
for($i = 1; $i < $bookingRequest->getSingleRoomCount(); ++$i)
|
||||
/*var_dump($bookingRequest->getSingleRoomCount());
|
||||
echo "<br>-<br>";
|
||||
$bs = $bookingRequest->getSingleRooms();
|
||||
foreach ($bs as $b ){
|
||||
var_dump($b->getCount());
|
||||
echo "<br>";
|
||||
var_dump($b->getTravelerCount());
|
||||
echo "<br>-<br>";
|
||||
}*/
|
||||
/*
|
||||
|
||||
for($i = 0; $i < $bookingRequest->getSingleRoomCount(); ++$i)
|
||||
{
|
||||
//echo "<br>check 1<br>";
|
||||
$a = $bookingRequest->getSingleRooms()[$i];
|
||||
var_dump($a->getCount());
|
||||
var_dump($i);
|
||||
|
||||
$this->context->getValidator()->inContext($this->context)
|
||||
->atPath('rooms['.$i.']')
|
||||
->validate($bookingRequest->getSingleRooms()[$i])
|
||||
;
|
||||
}
|
||||
|
||||
for($i = 1; $i < $bookingRequest->getSingleRoomChildCount(); ++$i)
|
||||
{
|
||||
//echo "<br>check 2<br>";
|
||||
$a = $bookingRequest->getSingleChildRooms()[$i];
|
||||
//var_dump($a->getType());
|
||||
$this->context->getValidator()->inContext($this->context)
|
||||
->atPath('rooms['.($i+3).']')
|
||||
->validate($bookingRequest->getSingleChildRooms()[$i])
|
||||
|
|
@ -55,6 +75,7 @@ class BookingRequestValidator extends ConstraintValidator
|
|||
}
|
||||
for($i = 1; $i < $bookingRequest->getDoubleRoomCount(); ++$i)
|
||||
{
|
||||
//echo "<br>check 3<br>";
|
||||
$this->context->getValidator()->inContext($this->context)
|
||||
->atPath('rooms['.($i+7).']')
|
||||
->validate($bookingRequest->getDoubleRooms()[$i])
|
||||
|
|
@ -63,14 +84,15 @@ class BookingRequestValidator extends ConstraintValidator
|
|||
|
||||
for($i = 1; $i < $bookingRequest->getDoubleRoomChildCount(); ++$i)
|
||||
{
|
||||
//echo "<br>check 4<br>";
|
||||
$this->context->getValidator()->inContext($this->context)
|
||||
->atPath('rooms['.($i+10).']')
|
||||
->validate($bookingRequest->getDoubleChildRooms()[$i])
|
||||
;
|
||||
}
|
||||
|
||||
for($i = 1; $i < $bookingRequest->getTripleRoomCount(); ++$i)
|
||||
{
|
||||
//echo "<br>check 5<br>";
|
||||
$this->context->getValidator()->inContext($this->context)
|
||||
->atPath('rooms['.($i + 13).']')
|
||||
->validate($bookingRequest->getTripleRooms()[$i])
|
||||
|
|
@ -78,10 +100,15 @@ class BookingRequestValidator extends ConstraintValidator
|
|||
}
|
||||
for($i = 1; $i < $bookingRequest->getTripleRoomChildCount(); ++$i)
|
||||
{
|
||||
//echo "<br>check 6<br>";
|
||||
$this->context->getValidator()->inContext($this->context)
|
||||
->atPath('rooms['.($i + 15).']')
|
||||
->validate($bookingRequest->getTripleChildRooms()[$i])
|
||||
;
|
||||
}
|
||||
|
||||
die();
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue