function hook_eu_cookie_compliance_path_match_alter in EU Cookie Compliance (GDPR Compliance) 8
Same name and namespace in other branches
- 7.2 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_path_match_alter()
- 7 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_path_match_alter()
- 2.0.x eu_cookie_compliance.api.php \hook_eu_cookie_compliance_path_match_alter()
Take control of EU Cookie Compliance path exclusion.
Parameters
bool $excluded: Whether this path is excluded from cookie compliance behavior.
string $path: Current string path.
string $exclude_paths: Admin variable of excluded paths.
1 invocation of hook_eu_cookie_compliance_path_match_alter()
File
- ./
eu_cookie_compliance.api.php, line 34 - Hooks specific to the EU Cookie Compliance module.
Code
function hook_eu_cookie_compliance_path_match_alter(&$excluded, $path, $exclude_paths) {
$node = \Drupal::routeMatch()
->getParameter('node');
if ($node && $node->type === 'my_type') {
$excluded = TRUE;
}
}