/** * {@inheritDoc} * * Format: * * <Page_Update code="PROD"> * <Item code="product_display"> * <ImageDimensions constrain="no"/> * </Item> * </Page_Update> */ public function toXml($version = Version::CURRENT, array $options = array()) { $xmlObject = new SimpleXMLElement('<Page_Update />'); $xmlObject->addAttribute('code', $this->getCode()); foreach ($this->getItems() as $item) { XmlHelper::appentToParent($xmlObject, $item->toXml($version, $options)); } return $xmlObject; }