public function SocialTourController::onboardingEnabled in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8.2 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8.3 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8.5 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8.6 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8.7 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 8.8 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 10.3.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 10.0.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 10.1.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
- 10.2.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::onboardingEnabled()
Check if onboarding is enabled.
Return value
bool Returns either TRUE or FALSE.
File
- modules/
custom/ social_tour/ src/ SocialTourController.php, line 71
Class
- SocialTourController
- Class SocialTourController.
Namespace
Drupal\social_tourCode
public function onboardingEnabled() {
// Check if tour is enabled by SM setting.
if ($this->configFactory
->get('social_tour_enabled') == FALSE) {
return FALSE;
}
// Check permissions.
if (!$this->currentUser
->hasPermission('access tour')) {
return FALSE;
}
// Check if current disabled it.
if ($this->userData
->get('social_tour', $this->currentUser
->id(), 'onboarding_disabled') == TRUE) {
return FALSE;
}
return TRUE;
}