original_string: protected function addGroups( \Aimeos\MShop\Context\Item\Iface $context )
  	{
  		if( ( $userid = Auth::id() ) !== null )
  		{
  			$context->setGroupIds( function() use ( $context, $userid )
  			{
  				$manager = \Aimeos\MShop::create( $context, 'customer' );
  				return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups();
  			} );
  		}
  
  		return $context;
  	}
code: protected function addGroups( \Aimeos\MShop\Context\Item\Iface $context )
  	{
  		if( ( $userid = Auth::id() ) !== null )
  		{
  			$context->setGroupIds( function() use ( $context, $userid )
  			{
  				$manager = \Aimeos\MShop::create( $context, 'customer' );
  				return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups();
  			} );
  		}
  
  		return $context;
  	}
code_tokens: protected function addGroups ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context ) { if ( ( $ userid = Auth :: id ( ) ) !== null ) { $ context -> setGroupIds ( function ( ) use ( $ context , $ userid ) { $ manager = \ Aimeos \ MShop :: create ( $ context , 'customer' ) ; return $ manager -> getItem ( $ userid , array ( 'customer/group' ) ) -> getGroups ( ) ; } ) ; } return $ context ; }
docstring: Adds the group IDs if available
  
  @param \Aimeos\MShop\Context\Item\Iface $context Context object
  @return \Aimeos\MShop\Context\Item\Iface Modified context object
docstring_tokens: Adds the group IDs if available