src/Controller/AnnuairesInvestisseursPrivesController.php line 126

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4.  * @author Mehrez Labidi
  5.  */
  6. namespace App\Controller;
  7. use App\Services\MetaTag;
  8. use App\Entity\InvestisseursPrives;
  9. use App\Entity\Panier;
  10. use App\Services\ManagerEntity\{
  11.     AnnuairesManagers,
  12.     SecteursActiviteManagers,
  13.     BusinessAngelManagers,
  14.     LocalisationsManagers,
  15.     DroitsAccesManagers,
  16.     CommandesManager
  17. };
  18. use Knp\Component\Pager\PaginatorInterface;
  19. use Symfony\Component\HttpFoundation\{
  20.     Request,
  21.     Response
  22. };
  23. use App\Repository\{
  24.     SecteursActiviteFondsRepository,
  25.     InvestisseursPrivesRepository,
  26.     CommandesRepository
  27. };
  28. use App\Helper\Utils;
  29. use App\Twig\TranslationExtension;
  30. use App\Helper\ParametersProvider;
  31. use Doctrine\ORM\EntityManagerInterface;
  32. use Symfony\Component\HttpFoundation\RedirectResponse;
  33. use App\Services\TelephoneInternational;
  34. use App\Services\Compte\Commandes\CommandesManagers;
  35. use App\Services\PDFGenerator;
  36. use App\Services\GoogleTag;
  37. /**
  38.  * Description of AnnuairesInvestisseursPrivesController
  39.  *
  40.  * @author mehrez
  41.  */
  42. class AnnuairesInvestisseursPrivesController extends EntityUsingController {
  43.     public const MAX_AGE 43200// 12heures
  44.     /**
  45.      * @var AnnuairesManagers
  46.      */
  47.     private $am;
  48.     /**
  49.      * @var SecteursActiviteManagers
  50.      */
  51.     private $sam;
  52.     /**
  53.      * @var BusinessAngelManagers
  54.      */
  55.     private $bam;
  56.     /**
  57.      * @var type
  58.      */
  59.     private $safRepo;
  60.     /**
  61.      * 
  62.      * @var type
  63.      */
  64.     private $ipRepo;
  65.     /**
  66.      * @var LocalisationsManagers
  67.      */
  68.     private $lm;
  69.     /**
  70.      * @var EntityManagerInterface
  71.      */
  72.     private $em;
  73.     /**
  74.      * @var CommandesManager
  75.      */
  76.     private $cm;
  77.     /**
  78.      * @var DroitsAccesManagers
  79.      */
  80.     private $dam;
  81.     /**
  82.      * @var MetaTag
  83.      */
  84.     private $metaTag;
  85.     
  86.     /*
  87.      * @var PDFGenerator
  88.      */
  89.     private $pf;
  90.     /**
  91.      * 
  92.      * @param AnnuairesManagers $am
  93.      * @param SecteursActiviteFondsRepository $safRepo
  94.      * @param InvestisseursPrivesRepository $ipRepo
  95.      */
  96.     public function __construct(AnnuairesManagers $amSecteursActiviteFondsRepository $safRepoInvestisseursPrivesRepository $ipRepoSecteursActiviteManagers $samBusinessAngelManagers $bamLocalisationsManagers $lmDroitsAccesManagers $damEntityManagerInterface $emCommandesManager $cmMetaTag $metaTag,  PDFGenerator $pf) {
  97.         $this->am $am;
  98.         $this->lm $lm;
  99.         $this->sam $sam;
  100.         $this->bam $bam;
  101.         $this->safRepo $safRepo;
  102.         $this->ipRepo $ipRepo;
  103.         $this->em $em;
  104.         $this->cm $cm;
  105.         $this->dam $dam;
  106.         $this->metaTag $metaTag;
  107.         $this->pf $pf;
  108.     }
  109.     public function index(Request $request$codePaysPaginatorInterface $paginator$filters = []): Response {
  110.         foreach ($request->query->all() as $input => $value) {
  111.             if (!in_array($value, [NULL"""0""indifferent"])) {
  112.                 $filters[$input] = trim($value);
  113.             }
  114.         }
  115.         $investisseurs $this->am->getInvestisseursPrivesList($request$paginator$filters); //  InvestisseursPrives  avec pagination
  116.         $response $this->render(
  117.                 'annuaires/investisseurs_prives/index.html.twig',
  118.                 [
  119.                     'investisseurs' => $investisseurs"filters" => $filters,
  120.                     "stade_investissement" => InvestisseursPrives::$STADE_INVESTISSEMENT,
  121.                     "capital_detenu" => InvestisseursPrives::$CAPITAL_DETENU,
  122.                     'controller_name' => 'AnnuairesInvestisseursPrivesController'
  123.                 ]
  124.         );
  125.         $response->setPublic();
  126.         $response->setMaxAge(self::MAX_AGE); // 12heures
  127.         $response->headers->addCacheControlDirective('must-revalidate'true);
  128.         return $response;
  129.     }
  130.     // version Annuaires Investisseurs Prives (obsolète)
  131.     /* public function details(Request $request, InvestisseursPrives $investisseur, $codePays): Response {
  132.       if (!$investisseur) {
  133.       throw $this->createNotFoundException('No investisseur  found for id ' . $investisseur);
  134.       }
  135.       $investisseur = Utils::convertObjectToArray($investisseur);
  136.       $investisseur["type_investisseur"] = (!empty($investisseur["type_investisseur"])) ? InvestisseursPrives::$TYPE_INVESTISSEUR[$investisseur["type_investisseur"]] : NULL;
  137.       $investisseur["capital_detenu"] = (!empty($investisseur["capital_detenu"])) ? InvestisseursPrives::$CAPITAL_DETENU[$investisseur["capital_detenu"]] : NULL;
  138.       $investisseur["role_souhaite"] = (!empty($investisseur["role_souhaite"])) ? InvestisseursPrives::$ROLE_SOUHAITE[$investisseur["role_souhaite"]] : NULL;
  139.       if (!empty($investisseur["stade_investissement"])) {
  140.       $investisseur["stade_investissement"] = array_map(
  141.       function ($item) {
  142.       return InvestisseursPrives::$STADE_INVESTISSEMENT[$item];
  143.       },
  144.       array_filter(explode(",", $investisseur["stade_investissement"]))
  145.       );
  146.       }
  147.       if (!empty($investisseur["id_secteurs_activite"])) {
  148.       $id_secteurs_activite = array_filter(explode(",", $investisseur["id_secteurs_activite"]));
  149.       $result = $this->safRepo->getNomSecteurActiviteFondsByIds($id_secteurs_activite);
  150.       $nom_secteurs = array_column($result, 'nom_secteur_activite');
  151.       $investisseur["id_secteurs_activite"] = $nom_secteurs;
  152.       }
  153.       $ids = $this->ipRepo->getInvestisseursPrivesList($request->query->all(), true);
  154.       $lienNext = (Utils::getNextFromArray($investisseur["id_investisseur"], $ids)) ? $this->generateUrl('investisseurs_prives_details', ['codePays' => $codePays, 'id_investisseur' => Utils::getNextFromArray($investisseur["id_investisseur"], $ids)]) : NULL;
  155.       $lienPrevious = (Utils::getPrevFromArray($investisseur["id_investisseur"], $ids)) ? $this->generateUrl('investisseurs_prives_details', ['codePays' => $codePays, 'id_investisseur' => Utils::getPrevFromArray($investisseur["id_investisseur"], $ids)]) : NULL;
  156.       $lienRetourList = $this->generateUrl('investisseurs_prives_index', ['codePays' => $codePays]);
  157.       if (!empty($request->query->all())) { // des param GET à garder
  158.       $lienNext = ($lienNext) ? $lienNext . Utils::convertArrayToUrlFormat($request->query->all()) : NULL;
  159.       $lienPrevious = ($lienPrevious) ? $lienPrevious . Utils::convertArrayToUrlFormat($request->query->all()) : NULL;
  160.       $lienRetourList = ($lienRetourList) ? $lienRetourList . Utils::convertArrayToUrlFormat($request->query->all()) : NULL;
  161.       }
  162.       $response = $this->render(
  163.       'annuaires/investisseurs_prives/details.html.twig',
  164.       [
  165.       'investisseur' => $investisseur,
  166.       "lienPrev" => $lienPrevious, "lienNext" => $lienNext, "lienRetourList" => $lienRetourList,
  167.       'controller_name' => 'AnnuairesInvestisseursPrivesController'
  168.       ]
  169.       );
  170.       $response->setPublic();
  171.       $response->setMaxAge(self::MAX_AGE); // 12heures
  172.       $response->headers->addCacheControlDirective('must-revalidate', true);
  173.       return $response;
  174.       } */
  175.     // version Ouvrir Capital - Business Angel
  176.     public function detail(Request $requestInvestisseursPrivesRepository $investisseurRepoTranslationExtension $translationExtensionCommandesRepository $commandesRepositoryGoogleTag $googleTag$idInvestisseurPrive$codePays): Response {
  177.         $lang $request->getSession()->get('lang');
  178.         $from $request->query->get('from');
  179.         $parametres $request->query->all();
  180.         $parametres ParametersProvider::prepareRechercheAvanceeOuvrirCapitalParameters($parametres);
  181.         $string_params $string_params_without_page $this->serializeParams($parametres);
  182.         $hasForfait false;
  183.         $hasServiceBA false;
  184.         $lignePanier false;
  185.         $dejaCommande false;
  186.         $forfaitAUtiliser = array();
  187.         $investisseur_prive $investisseurRepo->findOneBy(['id_investisseur' => $idInvestisseurPrive'mode' => 'publique']);
  188.         if (!$investisseur_prive) {
  189.             $this->addFlash('error'$translationExtension->translate("une erreur s'est produite, veuillez réessayer"$lang'''M'''));
  190.             if ($from == "ouvrir-capital") {
  191.                 return $this->redirectToRoute('ouvrir_capital_resultats_business_angel', ['codePays' => $codePays]);
  192.             } else {
  193.                 return $this->redirectToRoute('investisseurs_prives_index', ['codePays' => $codePays]);
  194.             }
  195.         }
  196.         
  197.         // On efface les anciens parametres s'ils existent, puis on insert les nouveaux
  198.         $googleTag->removeParametresPub();
  199.         
  200.         if ($investisseur_prive->_get('id_localisations_recherchees')) {
  201.             $id_localisations_recherchees trim($investisseur_prive->_get('id_localisations_recherchees'), ',');
  202.             $array_id_localisations_recherchees explode(","$id_localisations_recherchees);
  203.             
  204.             // On prend le premier id_localisation
  205.             if ($array_id_localisations_recherchees[0]) {
  206.                 // Si c'est un département
  207.                 if (substr_count($array_id_localisations_recherchees[0], "_") == 2) {
  208.                     $googleTag->setIdDepartement($array_id_localisations_recherchees[0]);
  209.                     $googleTag->setIdRegion(substr($array_id_localisations_recherchees[0], 0, -3));
  210.                     $googleTag->setIdPays(substr($array_id_localisations_recherchees[0], 0strpos($array_id_localisations_recherchees[0], "_")));
  211.                     // Si c'est une region
  212.                 } elseif (substr_count($array_id_localisations_recherchees[0], "_") == 1) {
  213.                     $googleTag->setIdRegion($array_id_localisations_recherchees[0]);
  214.                     $googleTag->setIdPays(substr($array_id_localisations_recherchees[0], 0strpos($array_id_localisations_recherchees[0], "_")));
  215.                     // Sinon c'est un pays
  216.                 } else {
  217.                     $googleTag->setIdPays($array_id_localisations_recherchees[0]);
  218.                 }
  219.             }
  220.         }
  221.         
  222.         if ($investisseur_prive->_get('id_secteurs_activite')) {
  223.             $id_secteur_activite_recherche trim($investisseur_prive->_get('id_secteurs_activite'), ",");
  224.             $array_secteur_activite_recherche explode(","$id_secteur_activite_recherche);
  225.             
  226.             // On prend le premier id_secteur_activite
  227.             if ($array_secteur_activite_recherche[0]) {
  228.                 $googleTag->setIdSecteurActiviteFonds($array_secteur_activite_recherche[0]);
  229.             }
  230.         }
  231.         
  232.         $user $this->getUser();
  233.         if (!empty($user)) {
  234.             $lignePanier $this->em->getRepository(Panier::class)->findOneBy(
  235.                     ['login_utilisateur' => $user->_get('login_utilisateur'), "type_object" => 'annonce_BA'"id_object" => $idInvestisseurPrive]
  236.             );
  237.             $dejaCommande $this->cm->hasAnnonceCommande($user->_get('login_utilisateur'), $idInvestisseurPrive'investisseur_prive');
  238.             $forfaitAUtiliser $this->dam->getFrofaitAnnonceToUse($user);
  239.             if (!empty($forfaitAUtiliser)) {
  240.                 $hasForfait true;
  241.             }
  242.             $hasServiceBA $this->dam->checkIfThisUserHasDroitService($user, [27]); // 27 = annuaire des business angel
  243.         }
  244.         $tab_commande_ba = [];
  245.         // On récupère la liste des investisseurs privés commandés par l'utilisateur
  246.         if (!empty($user)) {
  247.             $idUtilisateur $user->_get('id_utilisateur');
  248.             $userCommandes $commandesRepository->getUserCommandesAnnuaireBusinessAngel($idUtilisateur);
  249.             $string_id_investisseur "";
  250.             foreach ($userCommandes as $commande) {
  251.                 $string_id_investisseur .= $commande->_get('liste_investisseurs');
  252.             }
  253.             $tab_commande_ba array_filter(explode(","$string_id_investisseur));
  254.         }
  255.         /* $investisseur_prive->nom_affichage = substr(ucfirst($investisseur_prive->_get('prenom_contact')), 0, 1) . '.' . substr(ucfirst($investisseur_prive->_get('nom_contact')), 0, 1) . ' (INV_'.$investisseur_prive->_get('id_investisseur').')';
  256.           $deja_commande = false;
  257.           if ($tab_commande_ba) {
  258.           if (in_array($investisseur_prive->_get('id_investisseur'), $tab_commande_ba)) {
  259.           $investisseur_prive->nom_affichage = ucfirst($investisseur_prive->_get('prenom_contact')) . ' ' . ucfirst($investisseur_prive->_get('nom_contact')) . ' (INV_' . $investisseur_prive->_get('id_investisseur').')';
  260.           $deja_commande = true;
  261.           }
  262.           } */
  263.         $investisseur_prive->nom_affichage $investisseur_prive->_get('titre_investisseur');
  264.         $deja_commande false;
  265.         if ($dejaCommande || ($tab_commande_ba && in_array($investisseur_prive->_get('id_investisseur'), $tab_commande_ba)) || $hasServiceBA) {
  266.             $investisseur_prive->nom_affichage ucfirst($investisseur_prive->_get('prenom_contact')) . ' ' ucfirst($investisseur_prive->_get('nom_contact')) . ' - ' $investisseur_prive->_get('titre_investisseur');
  267.             if ($dejaCommande || ($tab_commande_ba && in_array($investisseur_prive->_get('id_investisseur'), $tab_commande_ba))) {
  268.                 $deja_commande true;
  269.             }
  270.         }
  271.         $id_secteurs_activite array_filter(explode(','$investisseur_prive->_get('id_secteurs_activite')));
  272.         $secteurs_activite = [];
  273.         foreach ($id_secteurs_activite as $id_secteur) {
  274.             $secteurs_activite[] = $this->sam->getNomSecteurActiviteFondsById($id_secteur);
  275.         }
  276.         if ($investisseur_prive->_get('id_localisations_recherchees') != "") {
  277.             $id_localisations_recherchees array_filter(explode(','$investisseur_prive->_get('id_localisations_recherchees')));
  278.         } else {
  279.             $id_localisations_recherchees = [];
  280.         }
  281.         $localisations_recherchees = [];
  282.         foreach ($id_localisations_recherchees as $id_localisation_recherchee) {
  283.             $localisations_recherchees[] = $this->lm->getStringNomLocalisationById($id_localisation_recherchee);
  284.         }
  285.         if ($from == "ouvrir-capital") {
  286.             $colorClass "orange-new";
  287.             $titreClass "titre_annonce_orange";
  288.             $btnClass "btn-orange-new";
  289.             // Navigation Ouvrir Capital Business Angel
  290.             $index $request->query->get('index');
  291.             $page = (int) $request->query->get('page'1);
  292.             if ($page 1) {
  293.                 $string_params .= "&page=" $page;
  294.             }
  295.             $urlList $request->query->get('urlList');
  296.             $urlRetourList $urlList $urlList '?' $string_params null;
  297.             $previousAnnonce $this->bam->getIndexNAnnonceFromBusinessAngelList($parametres""$page$index 1);
  298.             $nextAnnonce $this->bam->getIndexNAnnonceFromBusinessAngelList($parametres""$page$index 1);
  299.             $lienPrevious null;
  300.             $lienNext null;
  301.             $lienRetourList null;
  302.             $metaTitle 'investisseur privé, %$titre_investisseur%$';
  303.             $metaDescription 'consultez ce Business Angel, %$titre_investisseur%$';
  304.         } else {
  305.             $colorClass "bleu";
  306.             $titreClass "titre_annonce";
  307.             $btnClass "button-rond";
  308.             // Navigation Annuaire Investisseurs Prives
  309.             $ids $this->ipRepo->getInvestisseursPrivesList($request->query->all(), true);
  310.             $slugNext $investisseur_prive->_get('titre_investisseur') != "" Utils::slugify($investisseur_prive->_get('titre_investisseur')) : "";
  311.             $slugPrevious $investisseur_prive->_get('titre_investisseur') != "" Utils::slugify($investisseur_prive->_get('titre_investisseur')) : "";
  312.             $lienNext = (Utils::getNextFromArray($investisseur_prive->_get('id_investisseur'), $ids)) ? $this->generateUrl('investisseurs_prives_detail', ['slug' => $slugNext'codePays' => $codePays'idInvestisseurPrive' => Utils::getNextFromArray($investisseur_prive->_get('id_investisseur'), $ids)]) : NULL;
  313.             $lienPrevious = (Utils::getPrevFromArray($investisseur_prive->_get('id_investisseur'), $ids)) ? $this->generateUrl('investisseurs_prives_detail', ['slug' => $slugPrevious'codePays' => $codePays'idInvestisseurPrive' => Utils::getPrevFromArray($investisseur_prive->_get('id_investisseur'), $ids)]) : NULL;
  314.             $lienRetourList $this->generateUrl('investisseurs_prives_index', ['codePays' => $codePays]);
  315.             if (!empty($request->query->all())) { // des param GET à garder
  316.                 $lienNext = ($lienNext) ? $lienNext Utils::convertArrayToUrlFormat($request->query->all()) : NULL;
  317.                 $lienPrevious = ($lienPrevious) ? $lienPrevious Utils::convertArrayToUrlFormat($request->query->all()) : NULL;
  318.                 $lienRetourList = ($lienRetourList) ? $lienRetourList Utils::convertArrayToUrlFormat($request->query->all()) : NULL;
  319.             }
  320.             $index null;
  321.             $urlList null;
  322.             $urlRetourList null;
  323.             $string_params null;
  324.             $previousAnnonce null;
  325.             $nextAnnonce null;
  326.             $metaTitle 'investisseur privé, %$titre_investisseur%$';
  327.             $metaDescription 'consultez ce profil de Business Angel, %$titre_investisseur%$';
  328.         }
  329.         $http_host $request->server->get('HTTP_HOST');
  330.         $url substr($request->server->get('REDIRECT_URL'), 0, -4);
  331.         $canonical $http_host $url;
  332.         $arrayVarsTrans['titre_investisseur'] = $investisseur_prive->nom_affichage;
  333.         $metaTag $this->metaTag
  334.                 ->setTitle($translationExtension->translate($metaTitle$lang"""M"""$arrayVarsTrans))
  335.                 ->setDescription($translationExtension->translate($metaDescription$lang"""M"""$arrayVarsTrans))
  336.                 ->setCanonical($canonical);
  337.         return $this->render(
  338.                         'annuaires/investisseurs_prives/detail.html.twig',
  339.                         [
  340.                             'metaTag' => $metaTag,
  341.                             'investisseur_prive' => $investisseur_prive,
  342.                             'secteurs_activite' => $secteurs_activite,
  343.                             'localisations_recherchees' => $localisations_recherchees,
  344.                             'string_params' => $string_params,
  345.                             'string_params_without_page' => $string_params_without_page,
  346.                             'previousAnnonce' => $previousAnnonce,
  347.                             'nextAnnonce' => $nextAnnonce,
  348.                             'urlList' => $urlList,
  349.                             'urlRetourList' => $urlRetourList,
  350.                             'urlRetourListPanier'=>$urlRetourList,
  351.                             'string_params' => $string_params,
  352.                             'index' => $index,
  353.                             'indexPrevious' => $index 1,
  354.                             'indexNext' => $index 1,
  355.                             "lienPrev" => $lienPrevious,
  356.                             "lienNext" => $lienNext,
  357.                             "lienRetourList" => $lienRetourList,
  358.                             'deja_commande' => $deja_commande,
  359.                             'hasServiceBA' => $hasServiceBA,
  360.                             'from' => $from,
  361.                             'colorClass' => $colorClass,
  362.                             'titreClass' => $titreClass,
  363.                             'btnClass' => $btnClass,
  364.                             'lignePanier' => $lignePanier,
  365.                             'dejaCommande' => $dejaCommande,
  366.                             'hasForfait' => $hasForfait,
  367.                             'forfaitAUtiliser' => $forfaitAUtiliser,
  368.                             'googleTag' => $googleTag,
  369.                         ]
  370.         );
  371.     }
  372.     
  373.     public function imprimerInvestisseurPrive(InvestisseursPrivesRepository $investisseurRepoCommandesRepository $crTelephoneInternational $tiLocalisationsManagers $localisationManagerCommandesManagers $cm$idInvestisseurPrive,$codePays$lang)
  374.     {
  375.         $user $this->getUser();
  376.         $investisseur_prive $investisseurRepo->findOneBy(['id_investisseur' => $idInvestisseurPrive]);
  377.         $coordonnees = [];
  378.         $annee_passee false// Variable pour savoir si 1 an est passé depuis la commande, si oui, on n'affiche pas les coordonnées complètes (RGPD)
  379.         
  380.         // Si l'utilisateur a déjà commandé ce repreneur
  381.         if ($user && $cr->hasAnnonceCommande($user->_get('login_utilisateur'), $idInvestisseurPrive"investisseur_prive")) {
  382.             $coordonnees['nom_contact'] = ucfirst($investisseur_prive->_get('prenom_contact')) . ' ' strtoupper($investisseur_prive->_get('nom_contact'));
  383.             $coordonnees['telephone'] = $investisseur_prive->_get('telephone_contact') ? $ti->getInternationalPhone($investisseur_prive->_get('telephone_contact'), $investisseur_prive->_get('indicatif_telephone_contact'))['affichage'] : null;
  384.             $coordonnees['email'] = $investisseur_prive->_get('email_contact');
  385.             
  386.             $commande $cm->getArrayCommandeByIdElement($investisseur_prive->getId(), "investisseur_prive");
  387.             
  388.             if ($commande) {
  389.                 $annee_passee $commande['annee_passee'];
  390.             }
  391.         } elseif ('publique' != $investisseur_prive->_get('mode')) {
  392.             throw $this->createNotFoundException('Investisseur introuvable');
  393.         }
  394.         
  395.         $id_secteurs_activite array_filter(explode(','$investisseur_prive->_get('id_secteurs_activite')));
  396.         $secteurs_activite = [];
  397.         
  398.         foreach ($id_secteurs_activite as $id_secteur) {
  399.             $secteurs_activite[] = $this->sam->getNomSecteurActiviteFondsById($id_secteur);
  400.         }
  401.         
  402.         if ($investisseur_prive->_get('id_localisations_recherchees') != "") {
  403.             $id_localisations_recherchees array_filter(explode(','$investisseur_prive->_get('id_localisations_recherchees')));
  404.         } else {
  405.             $id_localisations_recherchees = [];
  406.         }
  407.         
  408.         $localisations_recherchees = [];
  409.         
  410.         foreach ($id_localisations_recherchees as $id_localisation_recherchee) {
  411.             $localisations_recherchees[] = $this->lm->getStringNomLocalisationById($id_localisation_recherchee);
  412.         }
  413.         
  414.         return $this->pf->generatePDFviewBrowser(
  415.                         'templates_pdf/annuaires/investisseurs_prives/investisseur_prive_details.html.twig',
  416.             [
  417.                 'lang' => $lang,
  418.                 'coordonnees' => $coordonnees,
  419.                 'annee_passee' => $annee_passee,
  420.                 'investisseur_prive' => $investisseur_prive,
  421.                 'secteurs_activite' => $secteurs_activite,
  422.                 'localisations_recherchees' => $localisations_recherchees,
  423.             ],
  424.             'investisseur_prive',
  425.             'investisseur_prive_title'
  426.             );
  427.     }
  428.     private function serializeParams($parametres) {
  429.         $string_params "";
  430.         foreach ($parametres as $name => $value) {
  431.             if ($name != "rechercher" && $name != "type" && $name != "array_localisation") {
  432.                 if ($string_params == "") {
  433.                     $string_params .= $name "=" $value;
  434.                 } else {
  435.                     $string_params .= "&" $name "=" $value;
  436.                 }
  437.             }
  438.         }
  439.         return $string_params;
  440.     }
  441.     /**
  442.      * @param Request $request
  443.      * @param type $codePays
  444.      * @return Response
  445.      */
  446.     public function ajoutProfil(Request $request$codePays): Response {
  447.          $this->denyAccessUnlessGranted('ROLE_USER'); //  page inaccessible sans authentification
  448.         return new RedirectResponse('/compte?module=investisseur_prive&action=ajout_investisseur&from=liste_investisseurs');
  449.     }
  450. }