protected function _getCatalogIds( MShop_Catalog_Item_Interface $tree, array $path, $currentId )
	{
		if( $tree->getId() == $currentId )
		{
			$ids = array();
			foreach( $tree->getChildren() as $item ) {
				$ids[] = $item->getId();
			}

			return $ids;
		}

		foreach( $tree->getChildren() as $child )
		{
			if( isset( $path[ $child->getId() ] ) ) {
				return $this->_getCatalogIds( $child, $path, $currentId );
			}
		}

		return array();
	}
protected function _getCatalogIds( MShop_Catalog_Item_Interface $tree, array $path, $currentId )
	{
		if( $tree->getId() == $currentId )
		{
			$ids = array();
			foreach( $tree->getChildren() as $item ) {
				$ids[] = $item->getId();
			}

			return $ids;
		}

		foreach( $tree->getChildren() as $child )
		{
			if( isset( $path[ $child->getId() ] ) ) {
				return $this->_getCatalogIds( $child, $path, $currentId );
			}
		}

		return array();
	}
protected function _getCatalogIds ( MShop_Catalog_Item_Interface $ tree , array $ path , $ currentId ) { if ( $ tree -> getId ( ) == $ currentId ) { $ ids = array ( ) ; foreach ( $ tree -> getChildren ( ) as $ item ) { $ ids [ ] = $ item -> getId ( ) ; } return $ ids ; } foreach ( $ tree -> getChildren ( ) as $ child ) { if ( isset ( $ path [ $ child -> getId ( ) ] ) ) { return $ this -> _getCatalogIds ( $ child , $ path , $ currentId ) ; } } return array ( ) ; }
Returns the category IDs of the given catalog tree.

Only the IDs of the children of the current category are returned.

@param MShop_Catalog_Item_Interface $tree Catalog node as entry point of the tree
@param array $path Associative list of category IDs as keys and the catalog
nodes from the currently selected category up to the root node
@param string $currentId Currently selected category
@return array List of category IDs
Returns the category IDs of the given catalog tree .