protected function _removeItems( $parentid, $name, $domain, $refdomain )
	{
		$context =  $this->_getContext();
		$key = str_replace( '/', '.', $name );

		$manager = MShop_Factory::createManager( $context, $refdomain );
		$listManager = MShop_Factory::createManager( $context, $name );


		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', $refdomain . '.domain', $domain ),
			$search->compare( '=~', $refdomain . '.label', 'Demo' ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$ids = array_keys( $manager->searchItems( $search ) );
		$manager->deleteItems( $ids );


		$search = $listManager->createSearch();
		$expr = array(
			$search->compare( '==', $key . '.parentid', $parentid ),
			$search->compare( '==', $key . '.domain', $refdomain ),
			$search->compare( '==', $key . '.refid', $ids ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$listIds = array_keys( $listManager->searchItems( $search ) );
		$listManager->deleteItems( $listIds );
	}
protected function _removeItems( $parentid, $name, $domain, $refdomain )
	{
		$context =  $this->_getContext();
		$key = str_replace( '/', '.', $name );

		$manager = MShop_Factory::createManager( $context, $refdomain );
		$listManager = MShop_Factory::createManager( $context, $name );


		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', $refdomain . '.domain', $domain ),
			$search->compare( '=~', $refdomain . '.label', 'Demo' ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$ids = array_keys( $manager->searchItems( $search ) );
		$manager->deleteItems( $ids );


		$search = $listManager->createSearch();
		$expr = array(
			$search->compare( '==', $key . '.parentid', $parentid ),
			$search->compare( '==', $key . '.domain', $refdomain ),
			$search->compare( '==', $key . '.refid', $ids ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$listIds = array_keys( $listManager->searchItems( $search ) );
		$listManager->deleteItems( $listIds );
	}
protected function _removeItems ( $ parentid , $ name , $ domain , $ refdomain ) { $ context = $ this -> _getContext ( ) ; $ key = str_replace ( '/' , '.' , $ name ) ; $ manager = MShop_Factory :: createManager ( $ context , $ refdomain ) ; $ listManager = MShop_Factory :: createManager ( $ context , $ name ) ; $ search = $ manager -> createSearch ( ) ; $ expr = array ( $ search -> compare ( '==' , $ refdomain . '.domain' , $ domain ) , $ search -> compare ( '=~' , $ refdomain . '.label' , 'Demo' ) , ) ; $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; $ ids = array_keys ( $ manager -> searchItems ( $ search ) ) ; $ manager -> deleteItems ( $ ids ) ; $ search = $ listManager -> createSearch ( ) ; $ expr = array ( $ search -> compare ( '==' , $ key . '.parentid' , $ parentid ) , $ search -> compare ( '==' , $ key . '.domain' , $ refdomain ) , $ search -> compare ( '==' , $ key . '.refid' , $ ids ) , ) ; $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; $ listIds = array_keys ( $ listManager -> searchItems ( $ search ) ) ; $ listManager -> deleteItems ( $ listIds ) ; }
Deletes the demo items from the given parent ID in the database.

@param string $parentid ID of the parent item where the associated items should be removed from
@param string $name Name of the list manager, e.g. 'catalog/list'
@param string $domain Name of the domain the items are associated to, e.g. 'catalog'
@param string $refdomain Name of the domain to remove the items from, e.g. 'text'
Deletes the demo items from the given parent ID in the database .