ynh_extension_meeo/libs/eleves/parent.lib.php

23 lines
No EOL
562 B
PHP

<?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>";
}
public function getEmail() {
return $this->user['bf_mail'];
}
}