You are here

public function SocialTourController::enableOnboarding in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  2. 8.2 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  3. 8.3 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  4. 8.4 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  5. 8.5 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  6. 8.6 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  7. 8.7 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  8. 8.8 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  9. 10.3.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  10. 10.0.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  11. 10.1.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()
  12. 10.2.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::enableOnboarding()

Enable onboarding for current_user by Ajax call.

1 string reference to 'SocialTourController::enableOnboarding'
social_tour.routing.yml in modules/custom/social_tour/social_tour.routing.yml
modules/custom/social_tour/social_tour.routing.yml

File

modules/custom/social_tour/src/SocialTourController.php, line 115

Class

SocialTourController
Class SocialTourController.

Namespace

Drupal\social_tour

Code

public function enableOnboarding() {

  // Save the value in the user_data.
  $this
    ->setData(FALSE);

  // Return 200.
  return new JsonResponse([
    'message' => $this
      ->t('Onboarding has been enabled.'),
  ], 200, [
    'Content-Type' => 'application/json',
  ]);
}