original_string: public function arretsToHide($newsletter_id = null)
      {
          $campagnes = $this->campagne->getAll($newsletter_id)->where('status','brouillon');
  
          return $campagnes->flatMap(function ($campagne) {
                  return $campagne->content;
              })->map(function ($content, $key) {
  
                  if($content->arret_id)
                      return $content->arret_id ;
  
                  if($content->groupe_id > 0)
                      return $content->groupe->arrets->pluck('id')->all();
              
              })->filter(function ($value, $key) {
                  return !empty($value);
              })->flatten()->toArray();
      }
code: public function arretsToHide($newsletter_id = null)
      {
          $campagnes = $this->campagne->getAll($newsletter_id)->where('status','brouillon');
  
          return $campagnes->flatMap(function ($campagne) {
                  return $campagne->content;
              })->map(function ($content, $key) {
  
                  if($content->arret_id)
                      return $content->arret_id ;
  
                  if($content->groupe_id > 0)
                      return $content->groupe->arrets->pluck('id')->all();
              
              })->filter(function ($value, $key) {
                  return !empty($value);
              })->flatten()->toArray();
      }
code_tokens: public function arretsToHide ( $ newsletter_id = null ) { $ campagnes = $ this -> campagne -> getAll ( $ newsletter_id ) -> where ( 'status' , 'brouillon' ) ; return $ campagnes -> flatMap ( function ( $ campagne ) { return $ campagne -> content ; } ) -> map ( function ( $ content , $ key ) { if ( $ content -> arret_id ) return $ content -> arret_id ; if ( $ content -> groupe_id > 0 ) return $ content -> groupe -> arrets -> pluck ( 'id' ) -> all ( ) ; } ) -> filter ( function ( $ value , $ key ) { return ! empty ( $ value ) ; } ) -> flatten ( ) -> toArray ( ) ; }
docstring: Interaction with site controllers
  List of arrets in non sent campagne to hide on frontend
docstring_tokens: Interaction with site controllers List of arrets in non sent campagne to hide on frontend