protected function _createTreeManager( $siteid )
	{
		if( !isset( $this->_treeManagers[$siteid] ) )
		{
			$context = $this->_getContext();
			$config = $context->getConfig();
			$dbm = $context->getDatabaseManager();


			$treeConfig = array(
				'search' => $this->_searchConfig,
				'dbname' => $this->_getResourceName(),
				'sql' => array(
					'delete' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/delete' ) ),
					'get' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/get' ) ),
					'insert' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/insert' ) ),
					'move-left' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/move-left' ) ),
					'move-right' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/move-right' ) ),
					'search' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/search' ) ),
					'update' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/update' ) ),
					'update-parentid' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/update-parentid' ) ),
					'newid' => $config->get( 'mshop/catalog/manager/default/item/newid' ),
				),
			);

			$this->_treeManagers[$siteid] = MW_Tree_Factory::createManager( 'DBNestedSet', $treeConfig, $dbm );
		}

		return $this->_treeManagers[$siteid];
	}
protected function _createTreeManager( $siteid )
	{
		if( !isset( $this->_treeManagers[$siteid] ) )
		{
			$context = $this->_getContext();
			$config = $context->getConfig();
			$dbm = $context->getDatabaseManager();


			$treeConfig = array(
				'search' => $this->_searchConfig,
				'dbname' => $this->_getResourceName(),
				'sql' => array(
					'delete' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/delete' ) ),
					'get' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/get' ) ),
					'insert' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/insert' ) ),
					'move-left' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/move-left' ) ),
					'move-right' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/move-right' ) ),
					'search' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/search' ) ),
					'update' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/update' ) ),
					'update-parentid' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/update-parentid' ) ),
					'newid' => $config->get( 'mshop/catalog/manager/default/item/newid' ),
				),
			);

			$this->_treeManagers[$siteid] = MW_Tree_Factory::createManager( 'DBNestedSet', $treeConfig, $dbm );
		}

		return $this->_treeManagers[$siteid];
	}
protected function _createTreeManager ( $ siteid ) { if ( ! isset ( $ this -> _treeManagers [ $ siteid ] ) ) { $ context = $ this -> _getContext ( ) ; $ config = $ context -> getConfig ( ) ; $ dbm = $ context -> getDatabaseManager ( ) ; $ treeConfig = array ( 'search' => $ this -> _searchConfig , 'dbname' => $ this -> _getResourceName ( ) , 'sql' => array ( 'delete' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/delete' ) ) , 'get' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/get' ) ) , 'insert' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/insert' ) ) , 'move-left' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/move-left' ) ) , 'move-right' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/move-right' ) ) , 'search' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/search' ) ) , 'update' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/update' ) ) , 'update-parentid' => str_replace ( ':siteid' , $ siteid , $ config -> get ( 'mshop/catalog/manager/default/item/update-parentid' ) ) , 'newid' => $ config -> get ( 'mshop/catalog/manager/default/item/newid' ) , ) , ) ; $ this -> _treeManagers [ $ siteid ] = MW_Tree_Factory :: createManager ( 'DBNestedSet' , $ treeConfig , $ dbm ) ; } return $ this -> _treeManagers [ $ siteid ] ; }
Creates an object for managing the nested set.

@param integer $siteid Site ID for the specific tree
@return MW_Tree_Manager_Interface Tree manager
Creates an object for managing the nested set .