[Changed] add "internal_names" to constant
This commit is contained in:
parent
53b3c878ce
commit
6fcb9f8b84
@ -7,20 +7,25 @@ use D3\GoogleAnalytics4\Application\Model\CMP\Usercentrics;
|
|||||||
class ManagerTypes
|
class ManagerTypes
|
||||||
{
|
{
|
||||||
const EXTERNAL_SERVICE = "eigener Service";
|
const EXTERNAL_SERVICE = "eigener Service";
|
||||||
|
const INTERNAL_EXTERNAL_SERVICE = "externalService";
|
||||||
const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
|
const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
|
||||||
|
const INTERNAL_NET_COOKIE_MANAGER = "net_cookie_manager";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Further information's:
|
* Further information's:
|
||||||
* https://github.com/aggrosoft/oxid-cookie-compliance
|
* https://github.com/aggrosoft/oxid-cookie-compliance
|
||||||
*/
|
*/
|
||||||
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
|
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
|
||||||
|
const INTERNAL_AGCOOKIECOMPLIANCE = "agcookiecompliance";
|
||||||
|
|
||||||
const CONSENTMANAGER = "Consentmanager";
|
const CONSENTMANAGER = "Consentmanager";
|
||||||
const INTERNAL_CONSENTMANAGER = "cmconsentmanager";
|
const INTERNAL_CONSENTMANAGER = "cmconsentmanager";
|
||||||
|
|
||||||
const COOKIEFIRST = "Cookiefirst";
|
const COOKIEFIRST = "Cookiefirst";
|
||||||
|
const INTERNAL_COOKIEFIRST = "cookiefirst";
|
||||||
|
|
||||||
const COOKIEBOT = "Cookiebot";
|
const COOKIEBOT = "Cookiebot";
|
||||||
|
const INTERNAL_COOKIEBOT = "cookiebot";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
@ -28,14 +33,14 @@ class ManagerTypes
|
|||||||
public function getManagerList(): array
|
public function getManagerList(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"externalService" => self::EXTERNAL_SERVICE,
|
self::INTERNAL_EXTERNAL_SERVICE => self::EXTERNAL_SERVICE,
|
||||||
"agcookiecompliance" => self::AGCOOKIECOMPLIANCE,
|
self::INTERNAL_AGCOOKIECOMPLIANCE => self::AGCOOKIECOMPLIANCE,
|
||||||
"net_cookie_manager" => self::NET_COOKIE_MANAGER,
|
self::INTERNAL_NET_COOKIE_MANAGER => self::NET_COOKIE_MANAGER,
|
||||||
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
|
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
|
||||||
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
|
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
|
||||||
"cmconsentmanager" => self::CONSENTMANAGER,
|
self::INTERNAL_CONSENTMANAGER => self::CONSENTMANAGER,
|
||||||
"cookiefirst" => self::COOKIEFIRST,
|
self::INTERNAL_COOKIEFIRST => self::COOKIEFIRST,
|
||||||
"cookiebot" => self::COOKIEBOT,
|
self::INTERNAL_COOKIEBOT => self::COOKIEBOT,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,11 +63,10 @@ class ManagerTypes
|
|||||||
return [
|
return [
|
||||||
Usercentrics::sModuleIncludationInternalName,
|
Usercentrics::sModuleIncludationInternalName,
|
||||||
Usercentrics::sExternalIncludationInternalName,
|
Usercentrics::sExternalIncludationInternalName,
|
||||||
ManagerTypes::CONSENTMANAGER,
|
|
||||||
ManagerTypes::INTERNAL_CONSENTMANAGER,
|
ManagerTypes::INTERNAL_CONSENTMANAGER,
|
||||||
ManagerTypes::COOKIEFIRST,
|
ManagerTypes::INTERNAL_COOKIEFIRST,
|
||||||
ManagerTypes::COOKIEBOT,
|
ManagerTypes::INTERNAL_COOKIEBOT,
|
||||||
ManagerTypes::EXTERNAL_SERVICE
|
ManagerTypes::INTERNAL_EXTERNAL_SERVICE
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -88,7 +88,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
$sCookieID = trim($this->d3GetModuleConfigParam('_sControlParameter'));
|
$sCookieID = trim($this->d3GetModuleConfigParam('_sControlParameter'));
|
||||||
|
|
||||||
// Netensio Cookie Manager
|
// Netensio Cookie Manager
|
||||||
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
|
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_NET_COOKIE_MANAGER) {
|
||||||
$oSession = Registry::getSession();
|
$oSession = Registry::getSession();
|
||||||
$aCookies = $oSession->getVariable("aCookieSel");
|
$aCookies = $oSession->getVariable("aCookieSel");
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Aggrosoft Cookie Consent
|
// Aggrosoft Cookie Consent
|
||||||
if ($this->sCookieManagerType === ManagerTypes::AGCOOKIECOMPLIANCE) {
|
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_AGCOOKIECOMPLIANCE) {
|
||||||
if (method_exists($this, "isCookieCategoryEnabled")) {
|
if (method_exists($this, "isCookieCategoryEnabled")) {
|
||||||
return $this->isCookieCategoryEnabled($sCookieID);
|
return $this->isCookieCategoryEnabled($sCookieID);
|
||||||
}
|
}
|
||||||
@ -139,16 +139,16 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_CONSENTMANAGER)
|
||||||
{
|
{
|
||||||
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
|
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEFIRST){
|
||||||
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
|
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEBOT){
|
||||||
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user