controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php
protected function getParentId( array $catalogMap, array $map, $code )
	{
		if( !isset( $map['catalog.parent'] ) )
		{
			$msg = sprintf( 'Required column "%1$s" not found for code "%2$s"', 'catalog.parent', $code );
			throw new \Aimeos\Controller\Jobs\Exception( $msg );
		}

		$parent = trim( $map['catalog.parent'] );

		if( $parent != '' && !isset( $catalogMap[$parent] ) )
		{
			$msg = sprintf( 'Parent node for code "%1$s" not found', $parent );
			throw new \Aimeos\Controller\Jobs\Exception( $msg );
		}

		return ( $parent != '' ? $catalogMap[$parent]->getId() : null );
	}
protected function getParentId( array $catalogMap, array $map, $code )
	{
		if( !isset( $map['catalog.parent'] ) )
		{
			$msg = sprintf( 'Required column "%1$s" not found for code "%2$s"', 'catalog.parent', $code );
			throw new \Aimeos\Controller\Jobs\Exception( $msg );
		}

		$parent = trim( $map['catalog.parent'] );

		if( $parent != '' && !isset( $catalogMap[$parent] ) )
		{
			$msg = sprintf( 'Parent node for code "%1$s" not found', $parent );
			throw new \Aimeos\Controller\Jobs\Exception( $msg );
		}

		return ( $parent != '' ? $catalogMap[$parent]->getId() : null );
	}
protected function getParentId ( array $ catalogMap , array $ map , $ code ) { if ( ! isset ( $ map [ 'catalog.parent' ] ) ) { $ msg = sprintf ( 'Required column "%1$s" not found for code "%2$s"' , 'catalog.parent' , $ code ) ; throw new \ Aimeos \ Controller \ Jobs \ Exception ( $ msg ) ; } $ parent = trim ( $ map [ 'catalog.parent' ] ) ; if ( $ parent != '' && ! isset ( $ catalogMap [ $ parent ] ) ) { $ msg = sprintf ( 'Parent node for code "%1$s" not found' , $ parent ) ; throw new \ Aimeos \ Controller \ Jobs \ Exception ( $ msg ) ; } return ( $ parent != '' ? $ catalogMap [ $ parent ] -> getId ( ) : null ) ; }
Returns the parent ID of the catalog node for the given code

@param array $catalogMap Associative list of catalog items with codes as keys and items implementing \Aimeos\MShop\Catalog\Item\Iface as values
@param array $map Associative list of catalog item key/value pairs
@param string $code Catalog item code of the parent category
@return string|null ID of the parent category or null for top level nodes
Returns the parent ID of the catalog node for the given code