ynh_extension_meeo/libs/eleves/parent.lib.php

35 lines
802 B
PHP
Raw Permalink Normal View History

<?php
namespace YesWiki\Meeo\Eleve;
use YesWiki\Bazar\Service\EntryManager;
class ParentEleve {
private $data;
private $user;
public function __construct(EntryManager $entryManager, $yunoshostFormId, $data) {
$this->data = $data;
// echo "<p>".var_dump($data)."</p>";
$userId = $data['listefiche'.$yunoshostFormId.'bf_parent'];
$this->user = $entryManager->getOne($userId);
// echo "<p>".var_dump($userId)."</p>";
// echo "<p>".var_dump($this)."</p>";
}
2024-09-04 14:19:03 +00:00
public function getUserId() {
return $this->user['bf_titre'];
}
2024-09-04 13:49:19 +00:00
public function getNom() {
if (empty($this->user['bf_nom'])) {
return $this->user['bf_titre'];
} else {
return $this->user['bf_nom'];
}
}
public function getEmail() {
return $this->user['bf_mail'];
}
}