@@ 161-172 (lines=12) @@ | ||
158 | /** |
|
159 | * @param Category $category |
|
160 | */ |
|
161 | protected function addCategory(Category $category) |
|
162 | { |
|
163 | $this->writer->startElement('category'); |
|
164 | $this->writer->writeAttribute('id', $category->getId()); |
|
165 | ||
166 | if ($category->getParentId() !== null) { |
|
167 | $this->writer->writeAttribute('parentId', $category->getParentId()); |
|
168 | } |
|
169 | ||
170 | $this->writer->text($category->getName()); |
|
171 | $this->writer->fullEndElement(); |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * @param Delivery $delivery |
|
@@ 177-186 (lines=10) @@ | ||
174 | /** |
|
175 | * @param Delivery $delivery |
|
176 | */ |
|
177 | protected function addDelivery(Delivery $delivery) |
|
178 | { |
|
179 | $this->writer->startElement('option'); |
|
180 | $this->writer->writeAttribute('cost', $delivery->getCost()); |
|
181 | $this->writer->writeAttribute('days', $delivery->getDays()); |
|
182 | if ($delivery->getOrderBefore() !== null) { |
|
183 | $this->writer->writeAttribute('order-before', $delivery->getOrderBefore()); |
|
184 | } |
|
185 | $this->writer->endElement(); |
|
186 | } |
|
187 | ||
188 | /** |
|
189 | * @param OfferInterface $offer |