Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Regard whitespace Rev 611 → Rev 617

/trunk/modules/resultat/formateurs/nom_scientifique/DeterminationFormateur.php
15,6 → 15,7
private $noms = array();
private $infosPourTpl = array();
 
 
public function __construct(ParametresResultats $parametres, Array $resultats,
Surligneur $surligneur = null, Trieur $trieur = null, AppUrls $urls = null,
ChaineManipulateur $manipulateurDeChaine = null, Images $imagesService = null) {
37,17 → 38,45
}
 
public function formater() {
$this->obtenirUrlsImagesCoste();
$this->obtenirUrlsPhotos();
$this->chargerRepartition();
$this->extraireInfosNomsPourTplDetermination();
}
 
private function obtenirUrlsPhotos() {
$this->imagesService->setProjet('cel');
$ids = $this->extraireIdDesNoms();
$urls = $this->imagesService->getUrlsImagesParIdsNoms($ids);
$this->infosPourTpl['imagesUrls'] = $this->supprimerCodeReftaxDesIds($urls);
}
 
private function obtenirUrlsImagesCoste() {
$this->extraireInfosTaxons();
$this->imagesService->setProjet('coste');
foreach ($this->infosPourTpl['taxons'] as $nn => $tax) {
$this->imagesService->setNnTaxon($tax);
$costeImg = $this->imagesService->getInfosImagesTaxons();
if (!empty($costeImg)) {
foreach ($costeImg as $infos) {
$num_taxon = $infos['num_taxonomique'];
$images[$num_taxon][] = $infos['binaire.href'];
$this->infosPourTpl['imagesCoste'] = $images;
}
}
}
}
 
private function extraireInfosTaxons() {
foreach ($this->noms as $id => $nom ) {
if (array_key_exists('num_taxonomique', $nom)) {
$this->infosPourTpl['taxons'][$id] = $nom['num_taxonomique'];
}
}
}
// TODO : utiliser le conteneur pour charger tous les objets de cette classe
private function chargerRepartition() {
$conteneur = new Conteneur();
67,6 → 96,9
$this->infosPourTpl['repartition']['urls'] = $urls;
}
 
 
 
private function extraireIdDesNoms() {
$ids = array();
foreach ($this->noms as $id => $nom) {