public function canEdit(Team $team, User $user) { try { $draftStart = $team->getLeague()->getDraft()->getStartTime(); if ($draftStart > new \DateTime()) { return parent::canEdit($team, $user); } } catch (\Exception $e) { } if (parent::canEdit($team, $user)) { //todo create repo to get next on clock $team->getLeague()->getDraft(); /** @var PickOrder $next */ $next = ''; if ($team == $next->getTeam()) { return true; } else { return false; } } return false; }