return $cookieGroupCollection;
} private function assignCookiesToGroups(CookieCollection
$cookieCollection, CookieGroupCollection
$cookieGroupCollection): void
{ /** @var CookieStruct $cookie */
foreach ($cookieCollection as $cookie) { $cookieGroup =
$cookieGroupCollection->
getGroupByName($cookie->
getGroupName());
$cookie->
setGroup($cookieGroup);
$cookieGroup->
addCookie($cookie);
} } private function addDefaultGroups(CookieGroupCollection
$cookieGroupCollection): void
{ $snippetNamespace =
$this->snippetManager->
getNamespace('frontend/cookie_consent/groups'
);
$cookieGroupCollection->
add(new CookieGroupStruct(CookieGroupStruct::TECHNICAL,
$snippetNamespace->
get('technical/title'
),
$snippetNamespace->
get('technical/description'
), true
));
$cookieGroupCollection->
add(new CookieGroupStruct(CookieGroupStruct::COMFORT,
$snippetNamespace->
get('comfort/title'
),
$snippetNamespace->
get('comfort/description'
)));
$cookieGroupCollection->
add(new CookieGroupStruct(CookieGroupStruct::PERSONALIZATION,
$snippetNamespace->
get('personalization/title'
),
$snippetNamespace->
get('personalization/description'
) ?? ''
));
$cookieGroupCollection->
add(new CookieGroupStruct(CookieGroupStruct::STATISTICS,
$snippetNamespace->
get('statistics/title'
),
$snippetNamespace->
get('statistics/description'
) ?? ''
));