private function getMyPageParameters(User $user) { $parms = array(); /* if ($user->isClub() && $user->isRelated()) { $club = $user->getClub(); $users = $club->getUsers(); $prospectors = array(); foreach ($users as $usr) { if (($usr->getRole() === User::$CLUB || $usr->getRole() === User::$CLUB_ADMIN) && $usr->getStatus() === User::$PRO) { $prospectors[] = $usr; } } $parms = array_merge( array( 'club' => $club, 'prospectors' => $prospectors, 'tournamentlist' => $this->getEnrollments($user) ), $this->listTeams($club) ); } */ if ($user->isEditor()) { $host = $user->getHost(); $users = $host->getEditors(); $parms = array('host' => $host, 'users' => $users, 'tournamentlist' => $this->getEnrollments($user)); } return array_merge($parms, array('currentuser' => $user), $this->getTournaments()); }