Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1460 Rev 1514
Line 1... Line 1...
1
<?php
1
<?php
2
class AppUrls {
2
class AppUrls {
-
 
3
	private $urlDomaine = null;
3
	private $urlBase = null;
4
	private $urlBase = null;
4
	private $urlMobile = null;
5
	private $urlMobile = null;
5
	private $urlBaseDossier = null;
6
	private $urlBaseDossier = null;
6
	private $urlCourante = null;
7
	private $urlCourante = null;
7
	private $urlRedirection = null;
8
	private $urlRedirection = null;
8
	private $urlPopUp = null;
9
	private $urlPopUp = null;
Line 9... Line 10...
9
 
10
 
-
 
11
	public function __construct(Url $urlBase = null, Url $urlBaseDossier = null, Url $urlPopUp = null, Url $urlMobile = null, Url $urlDomaine = null) {
10
	public function __construct(Url $urlBase = null, Url $urlBaseDossier = null, Url $urlPopUp = null, Url $urlMobile = null) {
12
		$this->urlDomaine = (is_null($urlDomaine)) ? Registre::get('eFlore.domaine') : $urlDomaine;
11
		$this->urlBase = (is_null($urlBase)) ? Registre::get('eFlore.urlBase') : $urlBase;
13
		$this->urlBase = (is_null($urlBase)) ? Registre::get('eFlore.urlBase') : $urlBase;
12
		$this->urlBaseDossier = (is_null($urlBaseDossier)) ? Registre::get('eFlore.urlBaseDossier') : $urlBaseDossier;
14
		$this->urlBaseDossier = (is_null($urlBaseDossier)) ? Registre::get('eFlore.urlBaseDossier') : $urlBaseDossier;
13
		$this->urlPopUp = (is_null($urlPopUp)) ? Registre::get('eFlore.urlPopUp') : $urlPopUp;
15
		$this->urlPopUp = (is_null($urlPopUp)) ? Registre::get('eFlore.urlPopUp') : $urlPopUp;
14
		$this->urlMobileTpl = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobileTpl') : $urlMobile;
16
		$this->urlMobileTpl = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobileTpl') : $urlMobile;
Line 77... Line 79...
77
		return $url;
79
		return $url;
78
	}
80
	}
Line 79... Line 81...
79
 
81
 
80
	public function getParametresUrlRechercheAvancee() {
82
	public function getParametresUrlRechercheAvancee() {
81
		$parametres = array(
83
		$parametres = array(
82
			'referentiel' => Registre::get('parametres.referentiel'),
-
 
83
			'niveau' => Registre::get('parametres.niveau'),
84
			'hFR[referentiels][0]' => Registre::get('parametres.referentiel'),
84
			'module' => 'recherche',
-
 
85
			'action' => 'rechercheAvancee',
-
 
86
			'type_nom' => 'nom_scientifique'
85
			'in' => 'flore'
87
		);
86
		);
88
		return $parametres;
87
		return $parametres;
Line 89... Line 88...
89
	}
88
	}
Line 107... Line 106...
107
	}
106
	}
Line 108... Line 107...
108
 
107
 
109
	public function obtenirUrlRechercheAvancee($params = array()) {
108
	public function obtenirUrlRechercheAvancee($params = array()) {
110
		$parametres = $this->getParametresUrlRechercheAvancee();
109
		$parametres = $this->getParametresUrlRechercheAvancee();
111
		$parametres = array_merge($parametres,$params);
110
		$parametres = array_merge($parametres,$params);
112
		$this->urlBase->setRequete($parametres);
111
		$this->urlDomaine->setRequete($parametres);
113
		$url = $this->urlBase->getURL();
112
		$url = $this->urlDomaine->getURL();
114
		return $url;
113
		return $url;
Line 115... Line 114...
115
	}
114
	}
116
 
115