public function indexAction(
        Request $request,
        PaginatorInterface $paginator,
        TokenStorageInterface $token_storage
    ): Response {
        // Get the invitations repo and a list of pending invites for this user.
        $repo = $this->em->getRepository(Invitation::class);
        $query = $repo->findPendingInvitationsQuery($token_storage->getToken()->getUser());

        // Paginate and render the invitations.
        $invitations = $paginator->paginate($query, $request->query->getInt('page', 1));

        return new Response($this->templating->render(
            '@BkstgSchedule/Invitation/index.html.twig',
            ['invitations' => $invitations]
        ));
    }