ynh_extension_meeo/libs/eleves/eleve.lib.php

30 lines
649 B
PHP
Raw Normal View History

<?php
namespace YesWiki\Meeo\Eleve;
use YesWiki\Bazar\Service\EntryManager;
class Eleve {
public $data;
public $classe;
public $user;
public function __construct(EntryManager $entryManager, $data) {
$this->data = $data;
$this->classe = $data['listeListeClassesbf_classe'];
$this->user = $entryManager->getOne($data['listeficheListebf_nom']);
// echo "<p>".var_dump($this)."</p>";
}
public function getId() {
return $this->data['id_fiche'];
}
public function getNom() {
if (empty($this->user['bf_nom'])) {
return $this->user['bf_titre'];
} else {
return $this->user['bf_nom'];
}
}
}