You are here

function hook_eu_cookie_compliance_cid_alter in EU Cookie Compliance (GDPR Compliance) 2.0.x

Same name and namespace in other branches
  1. 8 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.

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;
  }
}