public function SocialTourController::disableOnboarding in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.2 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.3 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.4 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.5 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.6 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.7 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 8.8 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 10.3.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 10.0.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 10.1.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
- 10.2.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::disableOnboarding()
Disable onboarding for current_user by Ajax call.
1 string reference to 'SocialTourController::disableOnboarding'
- 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 125
Class
- SocialTourController
- Class SocialTourController.
Namespace
Drupal\social_tourCode
public function disableOnboarding() {
// Save the value in the user_data.
$this
->setData(TRUE);
$redirect = \Drupal::request()
->get('destination') ?: '/stream';
// Set a message that they can be turned on again.
drupal_set_message($this
->t('You will not see tips like this anymore.'));
// Return to Profile.
return new RedirectResponse($redirect);
}