controller/jobs/src/Controller/Jobs/Attribute/Import/Xml/Standard.php
protected function getItems( array $nodes, array $ref )
	{
		$keys = [];

		foreach( $nodes as $node )
		{
			if( ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) {
				$keys[] = $attr->nodeValue;
			}
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), 'attribute' );
		$search = $manager->createSearch()->setSlice( 0, count( $keys ) );
		$search->setConditions( $search->compare( '==', 'attribute.key', $keys ) );

		return $manager->searchItems( $search, $ref );
	}
protected function getItems( array $nodes, array $ref )
	{
		$keys = [];

		foreach( $nodes as $node )
		{
			if( ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) {
				$keys[] = $attr->nodeValue;
			}
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), 'attribute' );
		$search = $manager->createSearch()->setSlice( 0, count( $keys ) );
		$search->setConditions( $search->compare( '==', 'attribute.key', $keys ) );

		return $manager->searchItems( $search, $ref );
	}
protected function getItems ( array $ nodes , array $ ref ) { $ keys = [ ] ; foreach ( $ nodes as $ node ) { if ( ( $ attr = $ node -> attributes -> getNamedItem ( 'ref' ) ) !== null ) { $ keys [ ] = $ attr -> nodeValue ; } } $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , 'attribute' ) ; $ search = $ manager -> createSearch ( ) -> setSlice ( 0 , count ( $ keys ) ) ; $ search -> setConditions ( $ search -> compare ( '==' , 'attribute.key' , $ keys ) ) ; return $ manager -> searchItems ( $ search , $ ref ) ; }
Returns the attribute items for the given nodes

@param \DomElement[] $nodes List of XML attribute item nodes
@param string[] $ref Domain names of referenced items that should be fetched too
@return \Aimeos\MShop\Attribute\Item\Iface[] Associative list of attribute items with IDs as keys
Returns the attribute items for the given nodes