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