You are here

function hook_cookiebot_path_match_alter in Cookiebot - Cookie consent, Cookie monitoring and Cookie control 8

Take control of Cookiebot 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_cookiebot_path_match_alter()
cookiebot_page_attachments_alter in ./cookiebot.module
Implements hook_page_attachments_alter().

File

./cookiebot.api.php, line 24
Hooks specific to the EU Cookie Compliance module.

Code

function hook_cookiebot_path_match_alter(&$excluded, $path, $exclude_paths) {
  $node = \Drupal::routeMatch()
    ->getParameter('node');
  if ($node && $node->type === 'my_type') {
    $excluded = TRUE;
  }
}