public function SetAltCookiesController::setCookies in Anti Spam by CleanTalk 9.1.x
Same name and namespace in other branches
- 8.4 src/Controller/SetAltCookiesController.php \Drupal\cleantalk\Controller\SetAltCookiesController::setCookies()
File
- src/
Controller/ SetAltCookiesController.php, line 10
Class
Namespace
Drupal\cleantalk\ControllerCode
public function setCookies(Request $request) {
$content = $request
->getContent();
$content = json_decode($content, true);
if (!empty($content) && is_array($content)) {
foreach ($content as $cookie) {
CleantalkFuncs::apbct_setcookie($cookie['name'], $cookie['value']);
}
}
die;
}