Exemple #1
0
 public function removeInterlocuteur(InterlocuteurFournisseur $interlocuteur)
 {
     $this->interlocuteurs->removeElement($interlocuteur);
     $interlocuteur->setRefSocieteFournisseur(null);
     //Mais si on supprime l'interlocuteur cela se répercute en base de données /!\
 }
Exemple #2
0
 /**
  * Permet de créer un span réutilisable dans le formulaire du fournisseur
  * @param  InterlocuteurFournisseur $interlocuteur [description]
  * @param  [type]              $uniqId        [description]
  * @return string                             Un span avec les informations de l'interlocuteur
  */
 public function creationSpanInterlocuteur(InterlocuteurFournisseur $interlocuteur, $uniqId)
 {
     // Récupération du traducteur
     $translator = $this->getServiceLocator()->get('Translator');
     $spanInterlocuteur = '<span class="entite interlocuteur">';
     if ($interlocuteur->getEnvoiVersOutlook() == true) {
         $spanInterlocuteur .= '<small class="label label-warning">' . $translator->translate('Outlook') . '</small> ';
     }
     $spanInterlocuteur .= $interlocuteur->getTitreCivilite() . ' ' . $interlocuteur->getPrenom() . ' ' . $interlocuteur->getNom();
     if (!empty($interlocuteur->getRefFonction())) {
         $spanInterlocuteur .= ' - ' . $interlocuteur->getRefFonction()->getIntituleFonction();
     }
     $spanInterlocuteur .= '<input type="hidden" value="' . $uniqId . '"/>
     						<i class="fa fa-times pull-right" title="' . $translator->translate('Supprimer') . '"></i>
     					</span>';
     return $spanInterlocuteur;
 }