Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 282 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 282 Rev 312
Line 28... Line 28...
28
		$this->imagesService = is_null($imagesService) ? new Images($this->parametres->projetImg) : $imagesService;
28
		$this->imagesService = is_null($imagesService) ? new Images($this->parametres->projetImg) : $imagesService;
29
		$this->chargerRepartition();
29
		$this->chargerRepartition();
30
	}
30
	}
Line 31... Line 31...
31
	
31
 
32
	private function chargerRepartition($nn) {
32
	private function chargerRepartition($nn) {
33
		$serviceRepartition = new Cartes('chorodep', $nn, 'nn', "108x101");
33
		$conteneur = new Conteneur();
-
 
34
		$cartesWs = $conteneur->getApiCartes();
-
 
35
		$cartesWs->setProjet('chorodep');
34
		$urlPng = $serviceRepartition->getUrlPng();
36
		$cartesWs->setLargeur('108x101');
-
 
37
		$urls = array();
-
 
38
		Debug::printr($this->noms);
-
 
39
		foreach ($this->noms as $nom) {
-
 
40
			if (array_key_exists('nom_retenu.code', $nom)) {
-
 
41
				$id = $nom['nom_retenu.code'];
-
 
42
				$id = $this->supprimerCodeReftax($id);
-
 
43
				$cartesWs->setId("nn:$id");
-
 
44
				if (array_key_exists($id, $urls) == false) {
-
 
45
					$urls[$id] = $cartesWs->getUrlPng();
-
 
46
				}
-
 
47
			}
-
 
48
		}
35
		return $urlPng;
49
		$this->infosPourTpl['repartition']['urls'] = $urls;
Line 36... Line 50...
36
	}
50
	}
37
 
51
 
38
	public function getTplInfos() {
52
	public function getTplInfos() {
Line 70... Line 84...
70
		}
84
		}
71
		return $nns;
85
		return $nns;
72
	}
86
	}
Line 73... Line 87...
73
 
87
 
74
	private function supprimerCodeReftaxDesUrls($urls) {
-
 
75
		$codeReftax = $this->parametres->reftaxCourant.'.';
88
	private function supprimerCodeReftaxDesUrls($urls) {
76
		$urlsNettoyees = array();
89
				$urlsNettoyees = array();
77
		foreach ($urls as $id => $url) {
90
		foreach ($urls as $id => $url) {
78
			$id = str_replace($codeReftax, '', $id);
91
			$id = $this->supprimerCodeReftax($id);
79
			$urlsNettoyees[$id] = $url;
92
			$urlsNettoyees[$id] = $url;
80
		}
93
		}
81
		return $urlsNettoyees;
94
		return $urlsNettoyees;
Line -... Line 95...
-
 
95
	}
-
 
96
 
-
 
97
	private function supprimerCodeReftax($chaine) {
-
 
98
		$codeReftax = $this->parametres->reftaxCourant.'.';
-
 
99
		$chaine = str_replace($codeReftax, '', $chaine);
-
 
100
		return $chaine;
Line 82... Line 101...
82
	}
101
	}
83
	
102
 
84
 
103
 
85
	private function extraireInfosNomsPourTplDetermination() {
104
	private function extraireInfosNomsPourTplDetermination() {