2023-05-31 12:17:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace D3\GoogleAnalytics4\Application\Model;
|
|
|
|
|
2024-05-31 15:18:26 +02:00
|
|
|
use D3\GoogleAnalytics4\Application\Model\CMP\Usercentrics;
|
|
|
|
|
2023-05-31 12:17:00 +02:00
|
|
|
class ManagerTypes
|
|
|
|
{
|
|
|
|
#ToDo: make own classes for each of the manager
|
|
|
|
|
|
|
|
|
|
|
|
const EXTERNAL_SERVICE = "externalService";
|
|
|
|
const NET_COOKIE_MANAGER = "net_cookie_manager";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Further information's:
|
|
|
|
* https://github.com/aggrosoft/oxid-cookie-compliance
|
|
|
|
*/
|
2024-05-31 15:18:26 +02:00
|
|
|
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
|
2023-05-31 12:17:00 +02:00
|
|
|
|
2024-05-31 15:18:26 +02:00
|
|
|
const CONSENTMANAGER = "Consentmanager";
|
2023-05-31 12:17:00 +02:00
|
|
|
|
|
|
|
const CONSENTMANAGER = "CONSENTMANAGER";
|
|
|
|
|
2023-06-27 08:33:49 +02:00
|
|
|
const COOKIEFIRST = "COOKIEFIRST";
|
|
|
|
|
2023-09-07 15:08:06 +02:00
|
|
|
const COOKIEBOT = "COOKIEBOT";
|
|
|
|
|
2023-05-31 12:17:00 +02:00
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getManagerList(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
"externalService" => self::EXTERNAL_SERVICE,
|
|
|
|
"agcookiecompliance" => self::AGCOOKIECOMPLIANCE,
|
|
|
|
"net_cookie_manager" => self::NET_COOKIE_MANAGER,
|
2024-05-31 15:18:26 +02:00
|
|
|
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
|
|
|
|
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
|
|
|
|
"cmconsentmanager" => self::CONSENTMANAGER,
|
2023-09-07 15:08:06 +02:00
|
|
|
"cookiefirst" => self::COOKIEFIRST,
|
|
|
|
"cookiebot" => self::COOKIEBOT,
|
2023-05-31 12:17:00 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $sManager
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isManagerInList(string $sManager) :bool
|
|
|
|
{
|
|
|
|
return in_array($sManager, $this->getManagerList(), true);
|
|
|
|
}
|
|
|
|
}
|