Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1326 → Rev 1327

/trunk/modules/fiche/formateurs/Repartition.php
23,7 → 23,7
private $cartes;
private $meta;
private $appUrls;
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
48,28 → 48,21
$donnees['chorodep'] = $this->donnees['repartition'];
$this->getMoissonnageExport();
// TODO: renommer l'index "eflore" en moissonnage
// et renommer dans pdf_export/squelettes/pdf_repartition.tpl.html
// et renommer dans pdf_export/squelettes/pdf_repartition.tpl.html
$donnees['eflore'] = $this->donnees['moissonnage'];
return $donnees;
}
 
private function getRepartition() {
$projetRepartition = Config::get($this->referentiel.'.baseRepartition');
// eg: eflore ou chorodep
// cf: bdtfx.ini, bdtxa.ini
if ($projetRepartition != "") {
if ($projetRepartition != '') {
$this->cartes->setProjet($projetRepartition);
$this->cartes->setLargeur('630');
//TODO: démochir ce code
// Chargement des nn des synonymes pour obtenir une carte plus complète
$noms = $this->conteneur->getApiNoms();
$syns = $noms->getSynonymes($this->nomCourant->getNnr());
$nns_syns = array_keys($syns['resultat']);
$nns_syns[] = $this->nomCourant->getNnr();
$id = 'nn:'.implode(',', $nns_syns);
$this->cartes->setId($id);
$nt = $this->conteneur->getNomCourant()->getNt();
$referentiel = $this->conteneur->getParametre('referentiel');
$this->cartes->setId("$referentiel.nn:$nt");
$repartition['svgUrl'] = $this->cartes->getUrlDataSvg();
$repartition['pngUrl'] = $this->cartes->getUrlPng();
$repartition['legende'] = $this->cartes->getLegendeId();
80,7 → 73,7
$this->donnees['repartition'] = $repartition;
}
}
 
private function getMoissonnage() {
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage');
if (! $projetMoissonnage) return;
94,7 → 87,7
$eflore['legende'] = $this->cartes->getLegende();
$this->donnees['moissonnage'] = $eflore;
}
 
private function getMoissonnageExport() {
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage');
if (! $projetMoissonnage) return;
105,7 → 98,7
$eflore['legende'] = $this->cartes->getLegende();
$this->donnees['moissonnage'] = $eflore;
}
 
private function getFloreProbable() {
$projetFloreProbable = Config::get($this->referentiel.'.baseFloreProbable');
if (! $projetFloreProbable) return;
140,7 → 133,7
 
return $donnees;
}
 
private function getChorodepMiniature() {
$projetRepartition = Config::get($this->referentiel.'.baseRepartition');
$url = null;
160,7 → 153,7
}
return $url;
}
 
private function getMoissonnageMiniature() {
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage');
$url = null;