72,6 → 72,7 |
$this->utilisateur = (isset($utilisateur) ? $utilisateur : '*'); |
$this->projet = (isset($projet) ? $projet : '*'); |
$this->dept = (isset($dept) ? $dept : '*'); |
$this->commune = (isset($commune) ? $commune : '*'); |
$this->num_taxon = (isset($num_taxon) ? $num_taxon : '*'); |
$this->station = (isset($station) ? $station : null); |
$this->format = (isset($format) ? $format : null); |
92,6 → 93,7 |
$widget['donnees']['utilisateur'] = $this->utilisateur; |
$widget['donnees']['projet'] = $this->projet; |
$widget['donnees']['dept'] = $this->dept; |
$widget['donnees']['commune'] = $this->commune; |
$widget['donnees']['num_taxon'] = $this->num_taxon; |
$widget['donnees']['taxons'] = $this->chargerTaxons(); |
if ($this->num_taxon != '*') { |
121,7 → 123,7 |
$url .= "/$action"; |
|
$parametres_retenus = array(); |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'dept', 'num_taxon'); |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'dept', 'commune', 'num_taxon'); |
foreach ($parametres_a_tester as $param) { |
if ($this->$param != null && $this->$param != '*') { |
$parametres_retenus[$param] = $this->$param; |
202,7 → 204,8 |
*/ |
public function executerObservations() { |
$widget = null; |
$observations = $this->chargerObservation(); |
$observations = $this->chargerObservations(); |
$nbre_obs = $this->chargerObservationsNbre(); |
|
// Création des infos du widget |
if (isset($observations['commune'])) { |
224,12 → 227,25 |
|
$widget['donnees']['observations'] = $observations; |
$widget['donnees']['station_id'] = $this->station; |
$widget['donnees']['nbre_obs_total'] = $nbre_obs; |
|
return $widget; |
} |
|
private function chargerObservation() { |
private function chargerPagination($url_tpl, $nbre) { |
|
} |
|
private function chargerObservationsNbre() { |
// Récupération des données au format Json |
$url = $this->contruireUrlServiceCarto('observations-nombre'); |
$json = $this->getDao()->consulter($url); |
$nbre = json_decode($json); |
return $nbre; |
} |
|
private function chargerObservations() { |
// Récupération des données au format Json |
$url = $this->contruireUrlServiceCarto('observations'); |
$json = $this->getDao()->consulter($url); |
$donnees = json_decode($json); |