Rev 996 | Blame | Last modification | View Log | RSS feed
<?php
class RechercheAvancee extends aControleur {
public function executerFormulaireRechercheAv($donnees= array()) {
$donnees['lien'] = (isset($donnees['params'])) ? $this->urls->obtenirUrlRechercheAvancee($donnees['params'])
: $this->urls->obtenirUrlRechercheAvancee();
$donnees['i18n'] = I18n::get('Recherche-form-avancee');
$donnees['referentiel'] = Registre::get('parametres.referentiel');
$donnees['url_base_completion_noms_sci'] = str_replace('{projet}', $donnees['referentiel'], Config::get('nomsTpl'));
$donnees['champs_presence'] = $this->obtenirChampsPresence();
$donnees['url_form'] = $this->urls->obtenirUrlBase();
return $this->getVue('form_recherche_av', $donnees);
}
private function obtenirChampsPresence() {
$tableau_champs_presence = array();
$referentiel = Registre::get('parametres.referentiel');
$champs_presence = Config::get($referentiel.'.champsPresence');
$champs_presence_spl = explode('|', $champs_presence);
foreach($champs_presence_spl as $champ) {
$label_param_champ = explode(':', $champ);
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
'label' => $label_param_champ[0]);
}
return $tableau_champs_presence;
}
}
?>