Skip to content
Snippets Groups Projects
Commit 5f268146 authored by Bram Driesen's avatar Bram Driesen Committed by Bram Driesen
Browse files

Issue #3285787 by pontus.andersson, BramDriesen, jhuhta: Multilingual support...

Issue #3285787 by pontus.andersson, BramDriesen, jhuhta: Multilingual support for Cookiebot module's cookie declaration functionality
parent 78f113b6
Branches
Tags 8.x-1.0-alpha11
No related merge requests found
......@@ -33,6 +33,12 @@ function cookiebot_update_8002() {
function cookiebot_update_8003() {
$config = \Drupal::configFactory()->getEditable('cookiebot.settings');
$declaration_node_path = $config->get('cookiebot_show_declaration_node_path');
// Exit early if the configuration node path is not set.
if (empty($declaration_node_path)) {
return;
}
$path = \Drupal::service('path_alias.manager')->getPathByAlias($declaration_node_path);
preg_match('/node\/(\d+)/', $path, $matches);
$node = \Drupal::entityTypeManager()->getStorage('node')->load($matches[1]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment