controller/frontend/src/Controller/Frontend/Subscription/Standard.php
public function get( $id )
	{
		$context = $this->getContext();

		$filter = $this->manager->createSearch( true );
		$expr = [
			$filter->compare( '==', 'subscription.id', $id ),
			$filter->compare( '==', 'order.base.customerid', $context->getUserId() ),
			$filter->getConditions(),
		];
		$filter->setConditions( $filter->combine( '&&', $expr ) );

		$items = $this->manager->searchItems( $filter );

		if( ( $item = reset( $items ) ) === false )
		{
			$msg = 'Invalid subscription ID "%1$s" for customer ID "%2$s"';
			throw new \Aimeos\Controller\Frontend\Subscription\Exception( sprintf( $msg, $id, $context->getUserId() ) );
		}

		return $item;
	}
public function get( $id )
	{
		$context = $this->getContext();

		$filter = $this->manager->createSearch( true );
		$expr = [
			$filter->compare( '==', 'subscription.id', $id ),
			$filter->compare( '==', 'order.base.customerid', $context->getUserId() ),
			$filter->getConditions(),
		];
		$filter->setConditions( $filter->combine( '&&', $expr ) );

		$items = $this->manager->searchItems( $filter );

		if( ( $item = reset( $items ) ) === false )
		{
			$msg = 'Invalid subscription ID "%1$s" for customer ID "%2$s"';
			throw new \Aimeos\Controller\Frontend\Subscription\Exception( sprintf( $msg, $id, $context->getUserId() ) );
		}

		return $item;
	}
public function get ( $ id ) { $ context = $ this -> getContext ( ) ; $ filter = $ this -> manager -> createSearch ( true ) ; $ expr = [ $ filter -> compare ( '==' , 'subscription.id' , $ id ) , $ filter -> compare ( '==' , 'order.base.customerid' , $ context -> getUserId ( ) ) , $ filter -> getConditions ( ) , ] ; $ filter -> setConditions ( $ filter -> combine ( '&&' , $ expr ) ) ; $ items = $ this -> manager -> searchItems ( $ filter ) ; if ( ( $ item = reset ( $ items ) ) === false ) { $ msg = 'Invalid subscription ID "%1$s" for customer ID "%2$s"' ; throw new \ Aimeos \ Controller \ Frontend \ Subscription \ Exception ( sprintf ( $ msg , $ id , $ context -> getUserId ( ) ) ) ; } return $ item ; }
Returns the subscription item for the given ID

@param string $id Unique subscription ID
@return \Aimeos\MShop\Subscription\Item\Iface Subscription object
Returns the subscription item for the given ID