a27b55a2504bd674309c9cac396a5d1e43a53a5f
[yaffs-website] / web / modules / contrib / eu_cookie_compliance / src / Controller / CheckIfEuCountryJsController.php
1 <?php
2
3 namespace Drupal\eu_cookie_compliance\Controller;
4
5 use Drupal\Core\Controller\ControllerBase;
6 use Symfony\Component\HttpFoundation\JsonResponse;
7
8 /**
9  * Controller for JS call that checks if the visitor is in the EU.
10  */
11 class CheckIfEuCountryJsController extends ControllerBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function content() {
17     $data = eu_cookie_compliance_user_in_eu();
18     return new JsonResponse($data, 200, ['Cache-Control' => 'private']);
19   }
20
21 }