@param Shopgate_Model_XmlResultObject $itemNode

@return Shopgate_Model_XmlResultObject
481754
public function asXml(Shopgate_Model_XmlResultObject $itemNode)
    {
        /**
         * @var Shopgate_Model_XmlResultObject $propertyNode
         */
        $propertyNode = $itemNode->addChild('property');
        $propertyNode->addAttribute('uid', $this->getUid());
        $propertyNode->addChildWithCDATA('label', $this->getLabel());
        $propertyNode->addChildWithCDATA('value', $this->getValue());

        return $itemNode;
    }
1024144
public function asXml(Shopgate_Model_XmlResultObject $itemNode)
    {
        /**
         * @var Shopgate_Model_XmlResultObject $tierPriceNode
         */
        $tierPriceNode = $itemNode->addChild('tier_price', $this->getReduction());
        $tierPriceNode->addAttribute('aggregate_children', $this->getAggregateChildren());
        $tierPriceNode->addAttribute('threshold', $this->getFromQuantity());
        $tierPriceNode->addAttribute('max_quantity', $this->getToQuantity());
        $tierPriceNode->addAttribute('type', $this->getReductionType());
        $tierPriceNode->addAttribute('customer_group_uid', $this->getCustomerGroupUid());

        return $itemNode;
    }
885741
public static function fromItemset( $itemSet, $allowSameElementRepeat = false )
	{
		$result = new DocumentOrderNodeIterator();
		$result->allowSameElementRepeat = $allowSameElementRepeat;
		$result->itemSet = array_values( $itemSet );
		return $result;
	}
551197
public function asXml(Shopgate_Model_XmlResultObject $itemNode)
    {
        /**
         * @var Shopgate_Model_XmlResultObject $visibilityNode
         */
        $visibilityNode = $itemNode->addChild('visibility');
        $visibilityNode->addAttribute('level', $this->getLevel());
        $visibilityNode->addAttribute('marketplace', $this->getMarketplace());

        return $itemNode;
    }
867214
public function addItemInstance(Nodes\NodeInterface $item, $location = null)
	{
		$location = (int) $location;

		$this->items[$location][] = $item;

		if ($id = $item->getId()) {
			$this->ids[$id] = $item;
		}

		return $item;
	}
215708
public CmsTreeItem getChild(String itemId) {

        CmsTreeItem result = m_children.getItem(itemId);
        return result;
    }
31616
public static function fromString($itemValue)
    {
        $bits = preg_split(
            '/\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\s*/',
            $itemValue,
            0,
            PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
        );
        $value = array_shift($bits);
        $attributes = array();

        $lastNullAttribute = null;
        foreach ($bits as $bit) {
            if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) &&
                ('"' === $start || '\'' === $start)) {
                $attributes[$lastNullAttribute] = substr($bit, 1, -1);
            } elseif ('=' === $end) {
                $lastNullAttribute = $bit = substr($bit, 0, -1);
                $attributes[$bit] = null;
            } else {
                $parts = explode('=', $bit);
                $attributes[$parts[0]] = isset($parts[1]) && strlen($parts[1]) > 0 ? $parts[1] : '';
            }
        }

        return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) &&
        ('"' === $start || '\'' === $start) ? substr($value, 1, -1) : $value, $attributes);
    }
185994
protected function createNewItem($itemData)
    {
        $item = array_flip($this->columns);

        foreach ($item as $key => $value) {
            if (isset($itemData[$key])) {
                $item[$key] = $itemData[$key];
            } else {
                $item[$key] = null;
            }
        }

        return $item;
    }
558544
protected function _getNodeList( MShop_Catalog_Item_Interface $node )
	{
		$nodes = array( $node );

		foreach( $node->getChildren() as $child ) {
			$nodes = array_merge( $nodes, $this->_getNodeList( $child ) );
		}

		return $nodes;
	}
692228
public function widgetToValue($varValue, $itemId)
    {
        if (null === $varValue) {
            return null;
        }
        static $cache = [];
        $attributeId = $this->get('id');
        if (array_key_exists($attributeId, $cache) && array_key_exists($varValue, $cache[$attributeId])) {
            return $cache[$attributeId][$varValue];
        }

        $model = $this->getSelectMetaModel();
        $alias = $this->getIdColumn();

        if ($model->hasAttribute($alias)) {
            $attribute = $model->getAttribute($alias);
            // It is an attribute, we may search for it.
            $ids = $attribute->searchFor($varValue);
        } else {
            // Must be a system column then.
            $result = $this->connection->createQueryBuilder()
                ->select('v.id')
                ->from($this->getSelectSource(), 'v')
                ->where('v.' . $this->getIdColumn() . '=:value')
                ->setParameter('value', $varValue)
                ->execute();

            $ids = $result->fetchAll(\PDO::FETCH_COLUMN);
        }

        // Maybe deleted value?
        if ([] === $ids) {
            return $cache[$attributeId][$varValue] = null;
        }

        // Multiple results.
        if (null === $ids || \count($ids) > 1) {
            throw new \RuntimeException(
                \sprintf(
                    'Multiple values found for %s, are there obsolete values for %s.%s (att_id: %s)?',
                    \var_export($varValue, true),
                    $model->getTableName(),
                    $this->getColName(),
                    $this->get('id')
                )
            );
        }
        $valueId = \array_shift($ids);

        $value = $this->getValuesById(
            [$valueId],
            [$this->getAliasColumn(), $this->getValueColumn(), $this->getIdColumn(), $this->getSortingColumn()]
        );

        return $cache[$attributeId][$varValue] = $value[$valueId];
    }
869149
public function asXml(Shopgate_Model_XmlResultObject $itemNode)
    {
        /**
         * @var Shopgate_Model_XmlResultObject $relationNode
         */
        $relationNode = $itemNode->addChild('relation');
        $relationNode->addAttribute('type', $this->getType());
        if ($this->getType() == self::DEFAULT_RELATION_TYPE_CUSTOM) {
            $relationNode->addChildWithCDATA('label', $this->getLabel());
        }
        foreach ($this->getValues() as $value) {
            $relationNode->addChild('uid', $value);
        }

        return $itemNode;
    }
162666
public function asXml(Shopgate_Model_XmlResultObject $itemNode)
    {
        /**
         * @var Shopgate_Model_XmlResultObject $stockNode
         */
        $stockNode = $itemNode->addChild('stock');
        $stockNode->addChild('is_saleable', (int)$this->getIsSaleable());
        $stockNode->addChild('backorders', (int)$this->getBackorders());
        $stockNode->addChild('use_stock', (int)$this->getUseStock());
        $stockNode->addChild('stock_quantity', $this->getStockQuantity());
        $stockNode->addChild('minimum_order_quantity', $this->getMinimumOrderQuantity(), null, false);
        $stockNode->addChild('maximum_order_quantity', $this->getMaximumOrderQuantity(), null, false);
        $stockNode->addChildWithCDATA('availability_text', $this->getAvailabilityText(), false);

        return $itemNode;
    }
772530
private function xmlResultToArray(\DOMElement $resultNode, \DOMElement $addressNode): Location
    {
        $builder = new AddressBuilder($this->getName());

        foreach (['state', 'county'] as $i => $tagName) {
            if (null !== ($adminLevel = $this->getNodeValue($addressNode->getElementsByTagName($tagName)))) {
                $builder->addAdminLevel($i + 1, $adminLevel, '');
            }
        }

        // get the first postal-code when there are many
        $postalCode = $this->getNodeValue($addressNode->getElementsByTagName('postcode'));
        if (!empty($postalCode)) {
            $postalCode = current(explode(';', $postalCode));
        }
        $builder->setPostalCode($postalCode);
        $builder->setStreetName($this->getNodeValue($addressNode->getElementsByTagName('road')) ?: $this->getNodeValue($addressNode->getElementsByTagName('pedestrian')));
        $builder->setStreetNumber($this->getNodeValue($addressNode->getElementsByTagName('house_number')));
        $builder->setLocality($this->getNodeValue($addressNode->getElementsByTagName('city')));
        $builder->setSubLocality($this->getNodeValue($addressNode->getElementsByTagName('suburb')));
        $builder->setCountry($this->getNodeValue($addressNode->getElementsByTagName('country')));
        $builder->setCountryCode(strtoupper($this->getNodeValue($addressNode->getElementsByTagName('country_code'))));
        $builder->setCoordinates($resultNode->getAttribute('lat'), $resultNode->getAttribute('lon'));

        $boundsAttr = $resultNode->getAttribute('boundingbox');
        if ($boundsAttr) {
            $bounds = [];
            list($bounds['south'], $bounds['north'], $bounds['west'], $bounds['east']) = explode(',', $boundsAttr);
            $builder->setBounds($bounds['south'], $bounds['north'], $bounds['west'], $bounds['east']);
        }

        return $builder->build();
    }
1297664
function getMediaItem($itemId)
    {
        $params = array(1, $this->username, $this->password, $itemId);

        return $this->sendRequest('wp.getMediaItem', $params);
    }
671408
public function buildMenu(ItemInterface $node, ItemEntity $item)
    {
        if ($item->getPath() && $this->fs->exists($item->getPath())) {
            $node->addChild('Fill folder', [
                'route' => 'item_folder_filler_fill',
                'routeParameters' => [
                    'id' => $item->getId(),
                    'name' => $item->getUrlName()
                ]
            ])
                ->setLinkAttribute('class', 'icon-label icon-fill');
        }
    }
1078130
public function getItemReflection($itemClass)
    {
        if (!isset($this->itemReflections[$itemClass])) {
            $reflection = new ItemReflection($itemClass, $this->reservedAttributeNames);
            $reflection->parse($this->reader);
            $this->itemReflections[$itemClass] = $reflection;
        }
        else {
            $reflection = $this->itemReflections[$itemClass];
        }
        
        return $reflection;
    }
321064
protected function restoreItemFromXml(DOMElement $node)
    {
        $item = array('attributes' => array());

        if ($node->hasAttributes()) {
            foreach ($node->attributes as $attr) {
                switch ($attr->name) {
                    case 'action':
                        $item['action'] = $attr->value;
                        break;
                    default:
                        $item['attributes'][$attr->name] = $attr->value;
                }
            }
        }

        foreach ($node->childNodes as $node) {
            if ($node->nodeType !== XML_ELEMENT_NODE) {
                continue;
            }

            switch ($node->nodeName) {
                case 'object_id':
                    $item['contentId'] = $node->nodeValue;
                    break;
                case 'node_id':
                    $item['locationId'] = $node->nodeValue;
                    break;
                case 'priority':
                    $item[$node->nodeName] = $node->nodeValue;
                    break;
                case 'ts_publication':
                    $item['publicationDate'] = $node->nodeValue;
                    break;
                case 'ts_visible':
                    $item['visibilityDate'] = $node->nodeValue;
                    break;
                case 'ts_hidden':
                    $item['hiddenDate'] = $node->nodeValue;
                    break;
                case 'rotation_until':
                    $item['rotationUntilDate'] = $node->nodeValue;
                    break;
                case 'moved_to':
                    $item['movedTo'] = $node->nodeValue;
                    break;
            }
        }

        return new Parts\Item($item);
    }