Subversion Repositories eFlore/Applications.coel-consultation

Compare Revisions

Ignore whitespace Rev 69 → Rev 70

/branches/v1.1-brouilly/modeles/StructureDao.php
13,6 → 13,7
*
*/
class StructureDao extends ColModele {
const ROLE_EQUIPE = 2027;
const SERVICE_STRUCTURE = 'CoelStructure';
const SERVICE_STRUCTURE_A_PERSONNE = 'CoelStructureAPersonne';
52,8 → 53,15
$url = $this->url_jrest.self::SERVICE_STRUCTURE_A_PERSONNE."/$id";
$json = file_get_contents($url);
$donnees = json_decode($json, true);
$this->nettoyerTableauDeTableauxAssoc($donnees['structuresAPersonne']);
return $donnees['structuresAPersonne'];
$personnes = $donnees['structuresAPersonne'];
$personnel = array();
foreach ($personnes as $personne) {
if ($personne['csap_id_role'] == self::ROLE_EQUIPE) {
$personnel[] = $personne;
}
}
return $personnel;
}
}
?>