API de la BdU du SdE
 Tout Classes Fonctions Variables Pages
student_mandates.php

Recherche des postes d'un étudiant

<?php
$student = $api->searchStudentByLogin('11goreti');
// Les mandats sont retournés sous la forme d'un tableau d'objets Bdu_Entity_Mandate
$mandates = $student->getCurrentMandates();
$mandates = $student->getAllMandates();
foreach ($mandates as $mandate){
echo $mandate->getStartDate()->format('d/m/Y');
// Un mandat est associé à une fonction dans l'association
$position = $mandate->getPosition();
echo $position->getName();
echo $position->getDescription();
$asso = $position->getAssociation();
}
// Vous pouvez aussi accéder aux associations dont l'étudiant est membre.
// Cela renvoie un tableau d'objets Bdu_Entity_Association
$associations = $student->getCurrentAssociations();
$associations = $student->getAllAssociations();