public function notificationAction($id)
    {
        /** @var PostInterface $post */
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

        if (!$post) {
            return $this->createNotFoundException();
        }

        $form = $post->getForm();

        /** @var Mailer $mailer */
        $mailer = $this->get('opifer.form.mailer');
        $mailer->sendNotificationMail($form, $post);

        $this->addFlash('success', 'Notification mail sent successfully');

        return $this->redirectToRoute('opifer_form_post_index', ['formId' => $form->getId()]);
    }
public function notificationAction($id)
    {
        /** @var PostInterface $post */
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

        if (!$post) {
            return $this->createNotFoundException();
        }

        $form = $post->getForm();

        /** @var Mailer $mailer */
        $mailer = $this->get('opifer.form.mailer');
        $mailer->sendNotificationMail($form, $post);

        $this->addFlash('success', 'Notification mail sent successfully');

        return $this->redirectToRoute('opifer_form_post_index', ['formId' => $form->getId()]);
    }
public function notificationAction ( $ id ) { /** @var PostInterface $post */ $ post = $ this -> get ( 'opifer.form.post_manager' ) -> getRepository ( ) -> find ( $ id ) ; if ( ! $ post ) { return $ this -> createNotFoundException ( ) ; } $ form = $ post -> getForm ( ) ; /** @var Mailer $mailer */ $ mailer = $ this -> get ( 'opifer.form.mailer' ) ; $ mailer -> sendNotificationMail ( $ form , $ post ) ; $ this -> addFlash ( 'success' , 'Notification mail sent successfully' ) ; return $ this -> redirectToRoute ( 'opifer_form_post_index' , [ 'formId' => $ form -> getId ( ) ] ) ; }
Re-sends a notification email for the given form post

@param int $id
@return RedirectResponse|\Symfony\Component\HttpKernel\Exception\NotFoundHttpException
Re - sends a notification email for the given form post