Line 40... |
Line 40... |
40 |
*/
|
40 |
*/
|
41 |
public function executer() {
|
41 |
public function executer() {
|
42 |
$retour = null;
|
42 |
$retour = null;
|
43 |
extract($this->parametres);
|
43 |
extract($this->parametres);
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
$this->projet = isset($projet) ? $projet : self::PROJET_DEFAUT;
|
45 |
$this->projet = (isset($projet) && trim($projet) != "") ? explode(',', $projet)[0] : self::PROJET_DEFAUT;
|
Line 46... |
Line 46... |
46 |
$this->chargerConfigProjet();
|
46 |
$this->chargerConfigProjet();
|
47 |
|
47 |
|
48 |
$service = isset($service) ? $service : 'widget';
|
48 |
$service = isset($service) ? $service : 'widget';
|
Line 115... |
Line 115... |
115 |
$widget['donnees']['url_remarques'] = $this->config['chemins']['widgetRemarquesUrl'];
|
115 |
$widget['donnees']['url_remarques'] = $this->config['chemins']['widgetRemarquesUrl'];
|
Line 116... |
Line 116... |
116 |
|
116 |
|
117 |
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut';
|
117 |
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut';
|
Line -... |
Line 118... |
- |
|
118 |
$widget['donnees']['titre'] = $this->getTitrePage();
|
- |
|
119 |
|
- |
|
120 |
$widget['donnees']['referentiel_impose'] = $referentiel_impose;
|
- |
|
121 |
$widget['donnees']['espece_imposee'] = false;
|
- |
|
122 |
$widget['donnees']['nn_espece_defaut'] = '';
|
- |
|
123 |
$widget['donnees']['nom_sci_espece_defaut'] = '';
|
118 |
$widget['donnees']['titre'] = $this->getTitrePage();
|
124 |
$widget['donnees']['infos_espece'] = '{}';
|
119 |
|
- |
|
- |
|
125 |
|
120 |
$projetsAutorises = $this->transformerEnTableau($this->config['projets']['autorises']);
|
126 |
$projetsAutorises = $this->transformerEnTableau($this->config['projets']['autorises']);
|
121 |
if (in_array($this->projet, $projetsAutorises)) {
|
127 |
|
122 |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl'];
|
128 |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl'];
|
123 |
$urlWsNs = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, $this->ns_referentiel, self::WS_NOM);
|
129 |
$urlWsNs = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, $this->ns_referentiel, self::WS_NOM);
|
124 |
$urlWsNsSansRef = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, '{referentiel}', self::WS_NOM);
|
130 |
$urlWsNsSansRef = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, '{referentiel}', self::WS_NOM);
|
125 |
$widget['donnees']['url_ws_autocompletion_ns'] = $urlWsNs;
|
131 |
$widget['donnees']['url_ws_autocompletion_ns'] = $urlWsNs;
|
126 |
$widget['donnees']['url_ws_autocompletion_ns_tpl'] = $urlWsNsSansRef;
|
- |
|
127 |
$widget['donnees']['ns_referentiel'] = $this->ns_referentiel;
|
- |
|
128 |
$widget['donnees']['referentiel_impose'] = $referentiel_impose;
|
- |
|
129 |
$widget['donnees']['espece_imposee'] = false;
|
- |
|
130 |
$widget['donnees']['nn_espece_defaut'] = '';
|
- |
|
131 |
$widget['donnees']['nom_sci_espece_defaut'] = '';
|
132 |
$widget['donnees']['url_ws_autocompletion_ns_tpl'] = $urlWsNsSansRef;
|
132 |
$widget['donnees']['infos_espece'] = '{}';
|
133 |
$widget['donnees']['ns_referentiel'] = $this->ns_referentiel;
|
133 |
|
134 |
|
134 |
if ($this->especeEstImposee()) {
|
135 |
if ($this->especeEstImposee()) {
|
135 |
$nnEspeceImposee = $this->getNnEspeceImposee();
|
136 |
$nnEspeceImposee = $this->getNnEspeceImposee();
|
136 |
$nom = $this->executerChargementInfosTaxon($nnEspeceImposee);
|
137 |
$nom = $this->executerChargementInfosTaxon($nnEspeceImposee);
|
137 |
$widget['donnees']['espece_imposee'] = true;
|
138 |
$widget['donnees']['espece_imposee'] = true;
|
138 |
$widget['donnees']['nn_espece_defaut'] = $nnEspeceImposee;
|
139 |
$widget['donnees']['nn_espece_defaut'] = $nnEspeceImposee;
|
139 |
$widget['donnees']['nom_sci_espece_defaut'] = $nom['nom_sci'];
|
- |
|
140 |
$widget['donnees']['infos_espece'] = $this->array2js($nom, true);
|
140 |
$widget['donnees']['nom_sci_espece_defaut'] = $nom['nom_sci'];
|
Line 141... |
Line 141... |
141 |
}
|
141 |
$widget['donnees']['infos_espece'] = $this->array2js($nom, true);
|
142 |
}
|
142 |
}
|
143 |
|
143 |
|