Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / eu_cookie_compliance / src / Routing / CheckIfEuCountryJs.php
diff --git a/web/modules/contrib/eu_cookie_compliance/src/Routing/CheckIfEuCountryJs.php b/web/modules/contrib/eu_cookie_compliance/src/Routing/CheckIfEuCountryJs.php
new file mode 100644 (file)
index 0000000..23868e2
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\eu_cookie_compliance\Routing;
+
+use Symfony\Component\Routing\Route;
+
+/**
+ * Defines dynamic routes.
+ */
+class CheckIfEuCountryJs {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function routes() {
+    $routes = array();
+    if (\Drupal::moduleHandler()->moduleExists('smart_ip')) {
+      $routes['eu_cookie_compliance.check_if_eu_country_js'] = new Route(
+        '/eu-cookie-compliance-check',
+        [
+          '_controller' => '\Drupal\eu_cookie_compliance\Controller\CheckIfEuCountryJsController::content',
+        ],
+        [
+          '_permission' => 'access content',
+        ]
+      );
+    }
+    return $routes;
+  }
+
+}