Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 163 Rev 202
Line 2... Line 2...
2
class NomRetenuDecorateur extends NomDecorateur {
2
class NomRetenuDecorateur extends NomDecorateur {
Line 3... Line 3...
3
 
3
 
4
	private $nomDecorateur = null;
4
	private $nomDecorateur = null;
5
	private $numNom = null;
5
	private $numNom = null;
6
	private $numNomRetenu = null;
6
	private $numNomRetenu = null;
7
	private $nomSci = null;
7
	private $nomSciRetenu = null;
Line 8... Line 8...
8
	private $detailsHrefTpl = null;
8
	private $detailsHrefTpl = null;
9
 
9
 
10
	public function __construct(NomDecorateur $nomDecorateur, $detailsHrefTpl) {
10
	public function __construct(NomDecorateur $nomDecorateur, $detailsHrefTpl) {
11
		$this->nomDecorateur = $nomDecorateur;
11
		$this->nomDecorateur = $nomDecorateur;
12
		$this->numNom = $this->nomDecorateur->nom->getTag('num_nom');
12
		$this->numNom = $this->nomDecorateur->nom->getTag('num_nom');
13
		$this->numNomRetenu = $this->nomDecorateur->nom->getTag('num_nom_retenu');
13
		$this->numNomRetenu = $this->nomDecorateur->nom->getTag('num_nom_retenu');
14
		$this->nomSci = $this->nomDecorateur->nom->getTag('nr_nom_sci');
14
		$this->nomSciRetenu = $this->nomDecorateur->nom->getTag('nr_nom_sci');
Line 15... Line 15...
15
		$this->detailsHrefTpl = $detailsHrefTpl;
15
		$this->detailsHrefTpl = $detailsHrefTpl;
16
	}
16
	}
17
 
17
 
18
	public function ajouterRetenu() {
18
	public function ajouterRetenu() {
19
		$nn = (int) $this->numNom;
19
		$nn = (int) $this->numNom;
Line 20... Line 20...
20
		$nnr = (int) $this->numNomRetenu;
20
		$nnr = (int) $this->numNomRetenu;
-
 
21
		$this->nomDecorateur->nomFormate['retenu'] = ($nn == $nnr) ? true : false;
21
		$this->nomDecorateur->nomFormate['retenu'] = ($nn == $nnr) ? true : false;
22
	}
-
 
23
 
22
	}
24
	public function ajouterId() {
Line 23... Line 25...
23
 
25
		if (empty($this->numNomRetenu) === false) {
-
 
26
			$this->nomDecorateur->nomFormate['nom_retenu.id'] = (int) $this->numNomRetenu;
24
	public function ajouterId() {
27
		}
25
		$this->nomDecorateur->nomFormate['nom_retenu.id'] = (int) $this->numNomRetenu;
28
	}
-
 
29
 
26
	}
30
	public function ajouterHref() {
Line 27... Line 31...
27
 
31
		if (empty($this->numNomRetenu) === false) {
28
	public function ajouterHref() {
32
			$href = sprintf($this->detailsHrefTpl, $this->numNomRetenu);
29
		$href = sprintf($this->detailsHrefTpl, $this->numNomRetenu);
33
			$this->nomDecorateur->nomFormate['nom_retenu.href'] = $href;
30
		$this->nomDecorateur->nomFormate['nom_retenu.href'] = $href;
34
		}
31
	}
35
	}
32
 
36