Controller/AzineEmailController.php
public function emailDetailsByTokenAction(Request $request, $token)
    {
        $email = $this->getDoctrine()->getManager()->getRepository(SentEmail::class)
            ->findOneByToken($token);

        if ($email instanceof SentEmail) {
            $recipients = implode(', ', $email->getRecipients());
            $variables = implode(', ', array_keys($email->getVariables()));

            return $this->render('AzineEmailBundle::sentEmailDetails.html.twig',
                array('email' => $email, 'recipients' => $recipients, 'variables' => $variables));
        }

        // the parameters-array is null => the email is not available in webView
        $days = $this->getParameter('azine_email_web_view_retention');
        $response = $this->render('AzineEmailBundle:Webview:mail.not.available.html.twig', array('days' => $days));
        $response->setStatusCode(404);

        return $response;
    }
public function emailDetailsByTokenAction(Request $request, $token)
    {
        $email = $this->getDoctrine()->getManager()->getRepository(SentEmail::class)
            ->findOneByToken($token);

        if ($email instanceof SentEmail) {
            $recipients = implode(', ', $email->getRecipients());
            $variables = implode(', ', array_keys($email->getVariables()));

            return $this->render('AzineEmailBundle::sentEmailDetails.html.twig',
                array('email' => $email, 'recipients' => $recipients, 'variables' => $variables));
        }

        // the parameters-array is null => the email is not available in webView
        $days = $this->getParameter('azine_email_web_view_retention');
        $response = $this->render('AzineEmailBundle:Webview:mail.not.available.html.twig', array('days' => $days));
        $response->setStatusCode(404);

        return $response;
    }
public function emailDetailsByTokenAction ( Request $ request , $ token ) { $ email = $ this -> getDoctrine ( ) -> getManager ( ) -> getRepository ( SentEmail :: class ) -> findOneByToken ( $ token ) ; if ( $ email instanceof SentEmail ) { $ recipients = implode ( ', ' , $ email -> getRecipients ( ) ) ; $ variables = implode ( ', ' , array_keys ( $ email -> getVariables ( ) ) ) ; return $ this -> render ( 'AzineEmailBundle::sentEmailDetails.html.twig' , array ( 'email' => $ email , 'recipients' => $ recipients , 'variables' => $ variables ) ) ; } // the parameters-array is null => the email is not available in webView $ days = $ this -> getParameter ( 'azine_email_web_view_retention' ) ; $ response = $ this -> render ( 'AzineEmailBundle:Webview:mail.not.available.html.twig' , array ( 'days' => $ days ) ) ; $ response -> setStatusCode ( 404 ) ; return $ response ; }
Displays an extended view of SentEmail entity searched by a token property.

@param string $token

@return Response
Displays an extended view of SentEmail entity searched by a token property .