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);
  }
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);
  }
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 ) ; }
Disable onboarding for current_user by Ajax call.
Disable onboarding for current_user by Ajax call .