/** * Creates the HTML needed to display a participant with a list of projects. * * @return String HTML */ public function show(\model\Participant $participant) { $ret = NavigationView::getUserMenu($participant->getUnique()); $ret .= '<h1>' . $participant->getName() . '</h1>'; $ret .= "<h2>Projects</h2>"; $ret .= "<ul>"; foreach ($participant->getProjects()->toArray() as $project) { $ret .= "<li>" . $project->getName() . "</li>"; } $ret .= "</ul>"; return $ret; }