You are here

class CheckIfEuCountryJs in EU Cookie Compliance (GDPR Compliance) 8

Same name and namespace in other branches
  1. 2.0.x src/Routing/CheckIfEuCountryJs.php \Drupal\eu_cookie_compliance\Routing\CheckIfEuCountryJs

Defines dynamic routes.

Hierarchy

Expanded class hierarchy of CheckIfEuCountryJs

File

src/Routing/CheckIfEuCountryJs.php, line 10

Namespace

Drupal\eu_cookie_compliance\Routing
View source
class CheckIfEuCountryJs {

  /**
   * Routes.
   *
   * @return array
   *   List of routes.
   */
  public function routes() {
    $routes = [];
    if (\Drupal::config('eu_cookie_compliance.settings')
      ->get('eu_only_js')) {
      $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;
  }

}

Members