Loading cookiebot.install +6 −0 Original line number Diff line number Diff line Loading @@ -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]); Loading Loading
cookiebot.install +6 −0 Original line number Diff line number Diff line Loading @@ -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]); Loading