public function DefaultController::setStyle in Opigno training catalog 8
Same name and namespace in other branches
- 3.x src/Controller/DefaultController.php \Drupal\opigno_catalog\Controller\DefaultController::setStyle()
Sets style.
1 string reference to 'DefaultController::setStyle'
File
- src/
Controller/ DefaultController.php, line 17
Class
- DefaultController
- Class DefaultController.
Namespace
Drupal\opigno_catalog\ControllerCode
public function setStyle($style) {
$tempstore = \Drupal::service('user.private_tempstore')
->get('opigno_catalog');
$tempstore
->set('style', $style);
return new JsonResponse(NULL, Response::HTTP_OK);
}