Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 163 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 163 Rev 207
1
<?php
1
<?php
2
class NomBasionymeDecorateur extends NomDecorateur {
2
class NomBasionymeDecorateur extends NomDecorateur {
3
 
3
 
4
	private $nomDecorateur = null;
4
	private $nomDecorateur = null;
5
	private $basionyme = null;
5
	private $basionyme = null;
6
	private $basionymeId = null;
6
	private $basionymeId = null;
7
	private $detailsHrefTpl = null;
7
	private $detailsHrefTpl = null;
-
 
8
	protected $correspondances = array(
-
 
9
		'basionyme' => 'Intitule',
-
 
10
		'basionyme.id' => 'Id',
-
 
11
		'basionyme.href' => 'Href',
-
 
12
		'basionyme.*' => 'Intitule,Id,Href');
8
 
13
 
9
	public function __construct(NomDecorateur $nomDecorateur, $detailsHrefTpl) {
14
	public function __construct(NomDecorateur $nomDecorateur, $detailsHrefTpl) {
10
		$this->nomDecorateur = $nomDecorateur;
15
		$this->nomDecorateur = $nomDecorateur;
11
		$this->detailsHrefTpl = $detailsHrefTpl;
16
		$this->detailsHrefTpl = $detailsHrefTpl;
12
		if ($this->nomDecorateur->nom->verifierTag('basionyme')) {
17
		if ($this->nomDecorateur->nom->verifierTag('basionyme')) {
13
			$this->basionymeId = $this->nomDecorateur->nom->getTag('basionyme');
18
			$this->basionymeId = $this->nomDecorateur->nom->getTag('basionyme');
14
		}
19
		}
15
		if ($this->nomDecorateur->nom->verifierTag('nb_nom_sci')) {
20
		if ($this->nomDecorateur->nom->verifierTag('nb_nom_sci')) {
16
			$this->basionyme = $this->nomDecorateur->nom->getTag('nb_nom_sci');
21
			$this->basionyme = $this->nomDecorateur->nom->getTag('nb_nom_sci');
17
		}
22
		}
18
	}
23
	}
19
 
24
 
20
	public function ajouterId() {
25
	public function ajouterId() {
21
		if (is_null($this->basionymeId) === false) {
26
		if (is_null($this->basionymeId) === false) {
22
			$this->nomDecorateur->nomFormate['basionyme.id'] = $this->basionymeId;
27
			$this->nomDecorateur->nomFormate['basionyme.id'] = $this->basionymeId;
23
		}
28
		}
24
	}
29
	}
25
 
30
 
26
	public function ajouterHref() {
31
	public function ajouterHref() {
27
		if (is_null($this->basionymeId) === false) {
32
		if (is_null($this->basionymeId) === false) {
28
			$href = sprintf($this->detailsHrefTpl, $this->basionymeId);
33
			$href = sprintf($this->detailsHrefTpl, $this->basionymeId);
29
			$this->nomDecorateur->nomFormate['basionyme.href'] = $href;
34
			$this->nomDecorateur->nomFormate['basionyme.href'] = $href;
30
		}
35
		}
31
	}
36
	}
32
 
37
 
33
	public function ajouterIntitule() {
38
	public function ajouterIntitule() {
34
		if (is_null($this->basionyme) === false) {
39
		if (is_null($this->basionyme) === false) {
35
			$this->nomDecorateur->nomFormate['basionyme'] = $this->basionyme;
40
			$this->nomDecorateur->nomFormate['basionyme'] = $this->basionyme;
36
		}
41
		}
37
	}
42
	}
38
}
43
}
39
?>
44
?>