controller/common/src/Controller/Common/Product/Import/Xml/Processor/Catalog/Standard.php
protected function getCatalogItems( \DOMNode $node )
	{
		foreach( $node->childNodes as $node )
		{
			if( $node->nodeName === 'catalogitem'
				&& ( $refAttr = $node->attributes->getNamedItem( 'ref' ) ) !== null
			) {
				$codes[] = $refAttr->nodeValue;
			}
		}

		$items = [];

		if( !empty( $codes ) )
		{
			$manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' );

			$search = $manager->createSearch()->setSlice( 0, count( $codes ) );
			$search->setConditions( $search->compare( '==', 'catalog.code', $codes ) );

			foreach( $manager->searchItems( $search ) as $item ) {
				$items[$item->getCode()] = $item;
			}
		}

		return $items;
	}
protected function getCatalogItems( \DOMNode $node )
	{
		foreach( $node->childNodes as $node )
		{
			if( $node->nodeName === 'catalogitem'
				&& ( $refAttr = $node->attributes->getNamedItem( 'ref' ) ) !== null
			) {
				$codes[] = $refAttr->nodeValue;
			}
		}

		$items = [];

		if( !empty( $codes ) )
		{
			$manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' );

			$search = $manager->createSearch()->setSlice( 0, count( $codes ) );
			$search->setConditions( $search->compare( '==', 'catalog.code', $codes ) );

			foreach( $manager->searchItems( $search ) as $item ) {
				$items[$item->getCode()] = $item;
			}
		}

		return $items;
	}
protected function getCatalogItems ( \ DOMNode $ node ) { foreach ( $ node -> childNodes as $ node ) { if ( $ node -> nodeName === 'catalogitem' && ( $ refAttr = $ node -> attributes -> getNamedItem ( 'ref' ) ) !== null ) { $ codes [ ] = $ refAttr -> nodeValue ; } } $ items = [ ] ; if ( ! empty ( $ codes ) ) { $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , 'catalog' ) ; $ search = $ manager -> createSearch ( ) -> setSlice ( 0 , count ( $ codes ) ) ; $ search -> setConditions ( $ search -> compare ( '==' , 'catalog.code' , $ codes ) ) ; foreach ( $ manager -> searchItems ( $ search ) as $ item ) { $ items [ $ item -> getCode ( ) ] = $ item ; } } return $ items ; }
Returns the catalog items referenced in the DOM node

@param \DOMNode $node XML document node containing a list of nodes to process
@return \Aimeos\MShop\Catalog\Item\Iface[] List of referenced catalog items
Returns the catalog items referenced in the DOM node