CloudObjects/SDK/AccountGateway/AccountContext.php
public function getConnectedAccountForService($service) {
		$accounts = $this->getDocument()->getGraph()->getNodesByType('coid://accountgateways.cloudobjects.io/Account');
		foreach ($accounts as $a) {
			if ($a->getProperty('coid://accountgateways.cloudobjects.io/isForService')
				&& $a->getProperty('coid://accountgateways.cloudobjects.io/isForService')->getId()==$service) return $a;
		}
		return null;
	}
public function getConnectedAccountForService($service) {
		$accounts = $this->getDocument()->getGraph()->getNodesByType('coid://accountgateways.cloudobjects.io/Account');
		foreach ($accounts as $a) {
			if ($a->getProperty('coid://accountgateways.cloudobjects.io/isForService')
				&& $a->getProperty('coid://accountgateways.cloudobjects.io/isForService')->getId()==$service) return $a;
		}
		return null;
	}
public function getConnectedAccountForService ( $ service ) { $ accounts = $ this -> getDocument ( ) -> getGraph ( ) -> getNodesByType ( 'coid://accountgateways.cloudobjects.io/Account' ) ; foreach ( $ accounts as $ a ) { if ( $ a -> getProperty ( 'coid://accountgateways.cloudobjects.io/isForService' ) && $ a -> getProperty ( 'coid://accountgateways.cloudobjects.io/isForService' ) -> getId ( ) == $ service ) return $ a ; } return null ; }
Get the connected account for a service.
@param $service COID of the service
Get the connected account for a service .