Helper/SiteAccess.php
public function getRecommendationServiceCredentials($mandatorId = null, $siteAccess = null)
    {
        $siteAccesses = $this->getSiteAccesses($mandatorId, $siteAccess);
        $siteAccess = end($siteAccesses);

        if ($siteAccess === self::SYSTEM_DEFAULT_SITEACCESS_NAME) {
            $siteAccess = null;
        }

        $customerId = $this->configResolver->getParameter('yoochoose.customer_id', 'ez_recommendation', $siteAccess);
        $licenceKey = $this->configResolver->getParameter('yoochoose.license_key', 'ez_recommendation', $siteAccess);

        return [$customerId, $licenceKey];
    }
public function getRecommendationServiceCredentials($mandatorId = null, $siteAccess = null)
    {
        $siteAccesses = $this->getSiteAccesses($mandatorId, $siteAccess);
        $siteAccess = end($siteAccesses);

        if ($siteAccess === self::SYSTEM_DEFAULT_SITEACCESS_NAME) {
            $siteAccess = null;
        }

        $customerId = $this->configResolver->getParameter('yoochoose.customer_id', 'ez_recommendation', $siteAccess);
        $licenceKey = $this->configResolver->getParameter('yoochoose.license_key', 'ez_recommendation', $siteAccess);

        return [$customerId, $licenceKey];
    }
public function getRecommendationServiceCredentials ( $ mandatorId = null , $ siteAccess = null ) { $ siteAccesses = $ this -> getSiteAccesses ( $ mandatorId , $ siteAccess ) ; $ siteAccess = end ( $ siteAccesses ) ; if ( $ siteAccess === self :: SYSTEM_DEFAULT_SITEACCESS_NAME ) { $ siteAccess = null ; } $ customerId = $ this -> configResolver -> getParameter ( 'yoochoose.customer_id' , 'ez_recommendation' , $ siteAccess ) ; $ licenceKey = $ this -> configResolver -> getParameter ( 'yoochoose.license_key' , 'ez_recommendation' , $ siteAccess ) ; return [ $ customerId , $ licenceKey ] ; }
Returns Recommendation Service credentials based on current siteAccess or mandatorId.

@param null|int $mandatorId
@param null|string $siteAccess

@return array
Returns Recommendation Service credentials based on current siteAccess or mandatorId .