wip: insurance booking in edit flow
This commit is contained in:
@@ -16,6 +16,7 @@ class BookingParser extends AbstractParser
|
||||
private readonly RoomsParser $roomsParser;
|
||||
private readonly PickupsParser $pickupsParser;
|
||||
private readonly SurchargesParser $surchargesParser;
|
||||
private readonly BookingInsurancesParser $insurancesParser;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -23,6 +24,7 @@ class BookingParser extends AbstractParser
|
||||
$this->roomsParser = new RoomsParser();
|
||||
$this->pickupsParser = new PickupsParser();
|
||||
$this->surchargesParser = new SurchargesParser();
|
||||
$this->insurancesParser = new BookingInsurancesParser();
|
||||
}
|
||||
|
||||
public function parse(Crawler $node): Booking
|
||||
@@ -101,6 +103,11 @@ class BookingParser extends AbstractParser
|
||||
$booking->surcharges = $this->surchargesParser->parse($surchargesData);
|
||||
}
|
||||
|
||||
$insurancesData = $node->filterXPath('//versicherungen/versicherung');
|
||||
if (0 < $insurancesData->count()) {
|
||||
$booking->insurances = $this->insurancesParser->parse($insurancesData);
|
||||
}
|
||||
|
||||
return $booking;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user