@@ 147-158 (lines=12) @@ | ||
144 | /** |
|
145 | * @param Category $category |
|
146 | */ |
|
147 | protected function addCategory(Category $category) |
|
148 | { |
|
149 | $this->writer->startElement('category'); |
|
150 | $this->writer->writeAttribute('id', $category->getId()); |
|
151 | ||
152 | if ($category->getParentId() !== null) { |
|
153 | $this->writer->writeAttribute('parentId', $category->getParentId()); |
|
154 | } |
|
155 | ||
156 | $this->writer->text($category->getName()); |
|
157 | $this->writer->fullEndElement(); |
|
158 | } |
|
159 | ||
160 | /** |
|
161 | * @param Delivery $delivery |
|
@@ 163-172 (lines=10) @@ | ||
160 | /** |
|
161 | * @param Delivery $delivery |
|
162 | */ |
|
163 | protected function addDelivery(Delivery $delivery) |
|
164 | { |
|
165 | $this->writer->startElement('option'); |
|
166 | $this->writer->writeAttribute('cost', $delivery->getCost()); |
|
167 | $this->writer->writeAttribute('days', $delivery->getDays()); |
|
168 | if ($delivery->getOrderBefore() !== null) { |
|
169 | $this->writer->writeAttribute('order-before', $delivery->getOrderBefore()); |
|
170 | } |
|
171 | $this->writer->endElement(); |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * @param OfferInterface $offer |