Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 311 → Rev 312

/trunk/modules/resultat/formateurs/nom_vernaculaire/DeterminationVernaFormateur.php
28,11 → 28,25
$this->imagesService = is_null($imagesService) ? new Images($this->parametres->projetImg) : $imagesService;
$this->chargerRepartition();
}
 
private function chargerRepartition($nn) {
$serviceRepartition = new Cartes('chorodep', $nn, 'nn', "108x101");
$urlPng = $serviceRepartition->getUrlPng();
return $urlPng;
$conteneur = new Conteneur();
$cartesWs = $conteneur->getApiCartes();
$cartesWs->setProjet('chorodep');
$cartesWs->setLargeur('108x101');
$urls = array();
Debug::printr($this->noms);
foreach ($this->noms as $nom) {
if (array_key_exists('nom_retenu.code', $nom)) {
$id = $nom['nom_retenu.code'];
$id = $this->supprimerCodeReftax($id);
$cartesWs->setId("nn:$id");
if (array_key_exists($id, $urls) == false) {
$urls[$id] = $cartesWs->getUrlPng();
}
}
}
$this->infosPourTpl['repartition']['urls'] = $urls;
}
 
public function getTplInfos() {
72,16 → 86,21
}
 
private function supprimerCodeReftaxDesUrls($urls) {
$codeReftax = $this->parametres->reftaxCourant.'.';
$urlsNettoyees = array();
$urlsNettoyees = array();
foreach ($urls as $id => $url) {
$id = str_replace($codeReftax, '', $id);
$id = $this->supprimerCodeReftax($id);
$urlsNettoyees[$id] = $url;
}
return $urlsNettoyees;
}
 
private function supprimerCodeReftax($chaine) {
$codeReftax = $this->parametres->reftaxCourant.'.';
$chaine = str_replace($codeReftax, '', $chaine);
return $chaine;
}
 
 
private function extraireInfosNomsPourTplDetermination() {
$taxons = array();
foreach ($this->noms as $idNomCourant => $nom) {
100,13 → 119,13
}
$this->infosPourTpl['noms'] = (count($taxons) > 0) ? $taxons : false;
}
 
private function supprimerCodeReftaxDesNns($nn) {
$codeReftax = $this->parametres->reftaxCourant.'.nn:';
return str_replace($codeReftax, '', $nn);
}
 
 
public function trier() {
 
}
120,11 → 139,11
$this->infosPourTpl['noms'][$idNom] = $nom;
}
}
 
private function definirMotsASurligner() {
$this->motsASurligner = explode(' ', $this->parametres->masqueRecherche);
}
 
private function surlignerMotsMasqueRecherche($nom) {
$this->surligneur->setTexte($nom);
$nom = $this->surligneur->surlignerMots($this->motsASurligner);