function hook_eu_cookie_compliance_cid_alter in EU Cookie Compliance (GDPR Compliance) 8
Same name and namespace in other branches
- 2.0.x eu_cookie_compliance.api.php \hook_eu_cookie_compliance_cid_alter()
Alter hook to modify the cache id of the banner data.
Parameters
bool $cid: The cache id to store the banner data.
1 invocation of hook_eu_cookie_compliance_cid_alter()
File
- ./
eu_cookie_compliance.api.php, line 60 - Hooks specific to the EU Cookie Compliance module.
Code
function hook_eu_cookie_compliance_cid_alter(&$cid) {
$node = \Drupal::routeMatch()
->getParameter('node');
if ($node && $node->type === 'my_type') {
$cid .= ':' . $node->type;
}
}