private function save()
 {
     $delete_all_streams = $this->form->get_value('delete_all_streams');
     if ($delete_all_streams) {
         if (AppContext::get_current_user()->check_level(User::MEMBER_LEVEL)) {
             NewsletterService::unsubscriber_all_streams_member(AppContext::get_current_user()->get_id());
         } else {
             NewsletterService::unsubscriber_all_streams_visitor($this->form->get_value('mail'));
         }
     } else {
         $streams = array();
         foreach ($this->form->get_value('choice') as $field => $option) {
             $streams[] = $option->get_id();
         }
         if (AppContext::get_current_user()->check_level(User::MEMBER_LEVEL) && $streams !== '') {
             NewsletterService::update_subscriptions_member_registered($streams, AppContext::get_current_user()->get_id());
         } else {
             NewsletterService::update_subscriptions_visitor($streams, $this->form->get_value('mail'));
         }
     }
     NewsletterStreamsCache::invalidate();
 }
 private function save()
 {
     $streams = array();
     foreach ($this->form->get_value('newsletter_choice') as $field => $option) {
         $streams[] = $option->get_id();
     }
     if (AppContext::get_current_user()->check_level(User::MEMBER_LEVEL)) {
         NewsletterService::update_subscriptions_member_registered($streams, AppContext::get_current_user()->get_id());
     } else {
         NewsletterService::update_subscriptions_visitor($streams, $this->form->get_value('mail'));
     }
 }