original_string: protected function addListItem( \Aimeos\MShop\Context\Item\Iface $context, $userid, $groupid )
  	{
  		$manager = \Aimeos\MShop::create( $context, 'customer/lists' );
  
  		$search = $manager->createSearch();
  		$expr = array(
  			$search->compare( '==', 'customer.lists.parentid', $userid ),
  			$search->compare( '==', 'customer.lists.refid', $groupid ),
  			$search->compare( '==', 'customer.lists.type', 'default' ),
  			$search->compare( '==', 'customer.lists.domain', 'customer/group' ),
  		);
  		$search->setConditions( $search->combine( '&&', $expr ) );
  		$search->setSlice( 0, 1 );
  
  		if( count( $manager->searchItems( $search ) ) === 0 )
  		{
  			$item = $manager->createItem();
  			$item->setDomain( 'customer/group' );
  			$item->setParentId( $userid );
  			$item->setRefId( $groupid );
  			$item->setType( 'default' );
  			$item->setStatus( 1 );
  
  			$manager->saveItem( $item, false );
  		}
  	}
code: protected function addListItem( \Aimeos\MShop\Context\Item\Iface $context, $userid, $groupid )
  	{
  		$manager = \Aimeos\MShop::create( $context, 'customer/lists' );
  
  		$search = $manager->createSearch();
  		$expr = array(
  			$search->compare( '==', 'customer.lists.parentid', $userid ),
  			$search->compare( '==', 'customer.lists.refid', $groupid ),
  			$search->compare( '==', 'customer.lists.type', 'default' ),
  			$search->compare( '==', 'customer.lists.domain', 'customer/group' ),
  		);
  		$search->setConditions( $search->combine( '&&', $expr ) );
  		$search->setSlice( 0, 1 );
  
  		if( count( $manager->searchItems( $search ) ) === 0 )
  		{
  			$item = $manager->createItem();
  			$item->setDomain( 'customer/group' );
  			$item->setParentId( $userid );
  			$item->setRefId( $groupid );
  			$item->setType( 'default' );
  			$item->setStatus( 1 );
  
  			$manager->saveItem( $item, false );
  		}
  	}
code_tokens: protected function addListItem ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context , $ userid , $ groupid ) { $ manager = \ Aimeos \ MShop :: create ( $ context , 'customer/lists' ) ; $ search = $ manager -> createSearch ( ) ; $ expr = array ( $ search -> compare ( '==' , 'customer.lists.parentid' , $ userid ) , $ search -> compare ( '==' , 'customer.lists.refid' , $ groupid ) , $ search -> compare ( '==' , 'customer.lists.type' , 'default' ) , $ search -> compare ( '==' , 'customer.lists.domain' , 'customer/group' ) , ) ; $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; $ search -> setSlice ( 0 , 1 ) ; if ( count ( $ manager -> searchItems ( $ search ) ) === 0 ) { $ item = $ manager -> createItem ( ) ; $ item -> setDomain ( 'customer/group' ) ; $ item -> setParentId ( $ userid ) ; $ item -> setRefId ( $ groupid ) ; $ item -> setType ( 'default' ) ; $ item -> setStatus ( 1 ) ; $ manager -> saveItem ( $ item , false ) ; } }
docstring: Associates the user to the group by their given IDs
  
  @param \Aimeos\MShop\Context\Item\Iface $context Aimeos context object
  @param string $userid Unique user ID
  @param string $groupid Unique group ID
docstring_tokens: Associates the user to the group by their given IDs