feat: fetch additional content from cms via api

This commit is contained in:
Björn Fromme
2025-11-20 15:42:41 +01:00
parent 33c3dc6022
commit 26681e5c62
18 changed files with 107 additions and 124 deletions
+3
View File
@@ -26,6 +26,9 @@ class Travel
#[Groups(['api:list', 'api:single'])]
public ?string $code = null;
#[Groups(['api:list', 'api:single'])]
public ?string $productCode = null;
#[Groups(['api:list', 'api:single'])]
public ?string $label = null;
+7
View File
@@ -54,6 +54,13 @@ class TravelParser extends AbstractParser
$travel->dateFrom = $dateFrom;
$travel->dateTo = $dateTo;
$travel->code = $node->attr('code');
// Parse product code from parent reise node using DOM
$domNode = $node->getNode(0);
if (null !== $domNode && null !== $domNode->parentNode) {
$travel->productCode = $domNode->parentNode->getAttribute('code');
}
$travel->type = $node->attr('reiseart');
$travel->status = $this->getStringOrNullValue($node->filterXPath('//status_hin'));
$travel->priceFrom = $this->stringToFloat($this->getStringOrNullValue($node->filterXPath('//abpreis')));