Hi everyone, I try to dump value comes from url to see what happen , but I've got null value any idea ?
public function historiqueEmpAction(){
$conge = array();
$i = 0;
$entite = Entite::findFirst("id_sup='".$this->session->get('IdUser')."'");
$persons = Personnel::find(array(
"id_entite='".$entite->getId()."'",
"order" => "nom"));
foreach ($persons as $person){
if(strcmp($person->getId(),$this->session->get("IdSup")!==0)){
$dbconges = Conge::find(array(
"id_personnel='".$person->getId()."'",
"order" => "date DESC"));
foreach($dbconges as $conges){
$conge[$i]['idEm'] = $person->getId();
$conge[$i]['nom'] = $person->getNom();
$conge[$i]['prenom'] = $person->getPrenom();
$conge[$i]['date'] = $conges->getDate();
$conge[$i]['nbrjour'] = $conges->getNbr_jour();
$i++;
}
}
}
$this->view->conges = $conge;
}
public function listeCongeEmpAction(){
$this->view->disable();
$x = $this->dispatcher->getParam('idEmp');
var_dump($x);
}
and my view :
{% block content %}
<th>Date de la demande</th><th>Nom Complet</th><th>Nombre des jours</th>
{% for valeur in conges %}
<tr>
<td align='center'>{{ valeur['date'] }}</td>
<td align='center'><a href="{{ url('administration/conge/listeCongeEmp/idEmp/')}}{{valeur['idEm']}}"> {{ valeur['nom'] }} {{ valeur['prenom'] }}</a></td>
<td align='center'>{{ valeur['nbrjour'] }}</td>
</tr>
{% endfor %}