Rev 202 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
class NomRetenuDecorateur extends NomDecorateur {
private $nomDecorateur = null;
private $numNom = null;
private $numNomRetenu = null;
private $nomSci = null;
private $detailsHrefTpl = null;
public function __construct(NomDecorateur $nomDecorateur, $detailsHrefTpl) {
$this->nomDecorateur = $nomDecorateur;
$this->numNom = $this->nomDecorateur->nom->getTag('num_nom');
$this->numNomRetenu = $this->nomDecorateur->nom->getTag('num_nom_retenu');
$this->nomSci = $this->nomDecorateur->nom->getTag('nr_nom_sci');
$this->detailsHrefTpl = $detailsHrefTpl;
}
public function ajouterRetenu() {
$nn = (int) $this->numNom;
$nnr = (int) $this->numNomRetenu;
$this->nomDecorateur->nomFormate['retenu'] = ($nn == $nnr) ? true : false;
}
public function ajouterId() {
$this->nomDecorateur->nomFormate['nom_retenu.id'] = (int) $this->numNomRetenu;
}
public function ajouterHref() {
$href = sprintf($this->detailsHrefTpl, $this->numNomRetenu);
$this->nomDecorateur->nomFormate['nom_retenu.href'] = $href;
}
public function ajouterIntitule() {
$this->nomDecorateur->nomFormate['nom_retenu'] = $this->nomSci;
}
}
?>