Joli\SlackSecretSanta\Controller\SantaController::summary PHP Method

summary() public method

public summary ( Request $request, $hash )
$request Symfony\Component\HttpFoundation\Request
    public function summary(Request $request, $hash)
    {
        $secretSanta = $this->getSecretSantaOrThrow404($request, $hash);
        $content = $this->twig->render('summary.txt.twig', ['secretSanta' => $secretSanta]);
        $response = new Response($content);
        $response->headers->set('Cache-Control', 'private');
        $response->headers->set('Content-type', 'text/plain');
        $response->headers->set('Content-Disposition', 'attachment; filename="summary.txt";');
        return $response;
    }