You are here

public function CheckIfEuCountryJs::routes 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::routes()

Routes.

Return value

array List of routes.

1 string reference to 'CheckIfEuCountryJs::routes'
eu_cookie_compliance.routing.yml in ./eu_cookie_compliance.routing.yml
eu_cookie_compliance.routing.yml

File

src/Routing/CheckIfEuCountryJs.php, line 18

Class

CheckIfEuCountryJs
Defines dynamic routes.

Namespace

Drupal\eu_cookie_compliance\Routing

Code

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;
}