1717 */
1818
1919use OpenConext \EngineBlock \Service \Consent \ConsentHashServiceInterface ;
20+ use OpenConext \EngineBlockBundle \Configuration \FeatureConfigurationInterface ;
2021
2122/**
2223 * @todo write a test
@@ -25,11 +26,14 @@ class EngineBlock_Corto_Model_Consent_Factory
2526{
2627
2728 private ConsentHashServiceInterface $ hashService ;
29+ private FeatureConfigurationInterface $ featureConfiguration ;
2830
2931 public function __construct (
30- ConsentHashServiceInterface $ hashService
32+ ConsentHashServiceInterface $ hashService ,
33+ FeatureConfigurationInterface $ featureConfiguration
3134 ) {
3235 $ this ->hashService = $ hashService ;
36+ $ this ->featureConfiguration = $ featureConfiguration ;
3337 }
3438
3539 /**
@@ -42,12 +46,8 @@ public function create(
4246 ): EngineBlock_Corto_Model_Consent {
4347 // If attribute manipulation was executed before consent, the NameId must be retrieved from the original response
4448 // object, in order to ensure correct 'hashed_user_id' generation.
45- $ featureConfiguration = EngineBlock_ApplicationSingleton::getInstance ()
46- ->getDiContainer ()
47- ->getFeatureConfiguration ();
48-
49- $ amPriorToConsent = $ featureConfiguration ->isEnabled ('eb.run_all_manipulations_prior_to_consent ' );
50- $ consentEnabled = $ featureConfiguration ->isEnabled ('eb.feature_enable_consent ' );
49+ $ amPriorToConsent = $ this ->featureConfiguration ->isEnabled ('eb.run_all_manipulations_prior_to_consent ' );
50+ $ consentEnabled = $ this ->featureConfiguration ->isEnabled ('eb.feature_enable_consent ' );
5151
5252 return new EngineBlock_Corto_Model_Consent (
5353 $ proxyServer ->getConfig ('ConsentStoreValues ' , true ),
0 commit comments