2024-09-04 13:25:23 +00:00
|
|
|
<?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 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'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-04 13:25:23 +00:00
|
|
|
public function getEmail() {
|
|
|
|
return $this->user['bf_mail'];
|
|
|
|
}
|
|
|
|
}
|