public function getPath( $id, array $ref = array() )
	{
		$sitePath = array_reverse( $this->_getContext()->getLocale()->getSitePath() );

		foreach( $sitePath as $siteId )
		{
			try {
				$path = $this->_createTreeManager( $siteId )->getPath( $id );
			} catch( Exception $e ) {
				continue;
			}

			if( !empty( $path ) )
			{
				$itemMap = array();

				foreach ( $path as $node ) {
					$itemMap[ $node->getId() ] = $node;
				}

				return $this->_buildItems( $itemMap, $ref, 'catalog' );
			}
		}

		throw new MShop_Catalog_Exception( sprintf( 'Catalog path for ID "%1$s" not found', $id ) );
	}
public function getPath( $id, array $ref = array() )
	{
		$sitePath = array_reverse( $this->_getContext()->getLocale()->getSitePath() );

		foreach( $sitePath as $siteId )
		{
			try {
				$path = $this->_createTreeManager( $siteId )->getPath( $id );
			} catch( Exception $e ) {
				continue;
			}

			if( !empty( $path ) )
			{
				$itemMap = array();

				foreach ( $path as $node ) {
					$itemMap[ $node->getId() ] = $node;
				}

				return $this->_buildItems( $itemMap, $ref, 'catalog' );
			}
		}

		throw new MShop_Catalog_Exception( sprintf( 'Catalog path for ID "%1$s" not found', $id ) );
	}
public function getPath ( $ id , array $ ref = array ( ) ) { $ sitePath = array_reverse ( $ this -> _getContext ( ) -> getLocale ( ) -> getSitePath ( ) ) ; foreach ( $ sitePath as $ siteId ) { try { $ path = $ this -> _createTreeManager ( $ siteId ) -> getPath ( $ id ) ; } catch ( Exception $ e ) { continue ; } if ( ! empty ( $ path ) ) { $ itemMap = array ( ) ; foreach ( $ path as $ node ) { $ itemMap [ $ node -> getId ( ) ] = $ node ; } return $ this -> _buildItems ( $ itemMap , $ ref , 'catalog' ) ; } } throw new MShop_Catalog_Exception ( sprintf ( 'Catalog path for ID "%1$s" not found' , $ id ) ) ; }
Returns a list if item IDs, that are in the path of given item ID.

@param integer $id ID of item to get the path for
@param array $ref List of domains to fetch list items and referenced items for
@return array Associative list of items implementing MShop_Catalog_Item_Interface with IDs as keys
Returns a list if item IDs that are in the path of given item ID .