client/html/src/Client/Html/Catalog/Stock/Standard.php
protected function getStockItems( array $productCodes )
	{
		$context = $this->getContext();

		/** client/html/catalog/stock/sort
		 * Sortation key if stock levels for different types exist
		 *
		 * Products can be shipped from several warehouses with a different
		 * stock level for each one. The stock levels for each warehouse will
		 * be shown in the product detail page. To get a consistent sortation
		 * of this list, the configured key will be used by the stock manager.
		 *
		 * Possible keys for sorting are ("-stock.type" for descending order):
		 * * stock.productcode
		 * * stock.stocklevel
		 * * stock.type
		 * * stock.dateback
		 *
		 * @param array List of key/value pairs for sorting
		 * @since 2017.01
		 * @category Developer
		 * @see client/html/catalog/stock/level/low
		 */
		$sort = $context->getConfig()->get( 'client/html/catalog/stock/sort', 'stock.type' );
		$type = $context->getLocale()->getSite()->getConfigValue( 'stocktype' );

		return \Aimeos\Controller\Frontend::create( $context, 'stock' )
			->code( $productCodes )->type( $type )->sort( $sort )
			->slice( 0, count( $productCodes ) )
			->search();
	}
protected function getStockItems( array $productCodes )
	{
		$context = $this->getContext();

		/** client/html/catalog/stock/sort
		 * Sortation key if stock levels for different types exist
		 *
		 * Products can be shipped from several warehouses with a different
		 * stock level for each one. The stock levels for each warehouse will
		 * be shown in the product detail page. To get a consistent sortation
		 * of this list, the configured key will be used by the stock manager.
		 *
		 * Possible keys for sorting are ("-stock.type" for descending order):
		 * * stock.productcode
		 * * stock.stocklevel
		 * * stock.type
		 * * stock.dateback
		 *
		 * @param array List of key/value pairs for sorting
		 * @since 2017.01
		 * @category Developer
		 * @see client/html/catalog/stock/level/low
		 */
		$sort = $context->getConfig()->get( 'client/html/catalog/stock/sort', 'stock.type' );
		$type = $context->getLocale()->getSite()->getConfigValue( 'stocktype' );

		return \Aimeos\Controller\Frontend::create( $context, 'stock' )
			->code( $productCodes )->type( $type )->sort( $sort )
			->slice( 0, count( $productCodes ) )
			->search();
	}
protected function getStockItems ( array $ productCodes ) { $ context = $ this -> getContext ( ) ; /** client/html/catalog/stock/sort
		 * Sortation key if stock levels for different types exist
		 *
		 * Products can be shipped from several warehouses with a different
		 * stock level for each one. The stock levels for each warehouse will
		 * be shown in the product detail page. To get a consistent sortation
		 * of this list, the configured key will be used by the stock manager.
		 *
		 * Possible keys for sorting are ("-stock.type" for descending order):
		 * * stock.productcode
		 * * stock.stocklevel
		 * * stock.type
		 * * stock.dateback
		 *
		 * @param array List of key/value pairs for sorting
		 * @since 2017.01
		 * @category Developer
		 * @see client/html/catalog/stock/level/low
		 */ $ sort = $ context -> getConfig ( ) -> get ( 'client/html/catalog/stock/sort' , 'stock.type' ) ; $ type = $ context -> getLocale ( ) -> getSite ( ) -> getConfigValue ( 'stocktype' ) ; return \ Aimeos \ Controller \ Frontend :: create ( $ context , 'stock' ) -> code ( $ productCodes ) -> type ( $ type ) -> sort ( $ sort ) -> slice ( 0 , count ( $ productCodes ) ) -> search ( ) ; }
Returns the list of stock items for the given product codes and the stock type

@param array $productCodes List of product codes
@return \Aimeos\MShop\Stock\Item\Iface[] Associative list stock IDs as keys and stock items as values
Returns the list of stock items for the given product codes and the stock type