Re-sends a notification email for the given form post

@param int $id
@return RedirectResponse|\Symfony\Component\HttpKernel\Exception\NotFoundHttpException
542117
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()]);
    }
176720
public function actionUpdate($id)
{
$model = $this->findModel($id);

if ($model->load($_POST) && $model->save()) {
return $this->redirect(Url::previous());
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
897910
public function restore($id)
    {
        $content = $this->repository->getDeletedById($id);
        if (!empty($content)) {
            $this->authorize('update', $content);
            $content->restore();
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
654327
public function update($id)
    {
        try {
            $entry = $this->collection->findOne($id);
        } catch (Exception $e) {
            // noop
        }

        if (is_null($entry)) {
            return $this->app->notFound();
        }

        if ($this->request->isPost() || $this->request->isPut()) {
            try {
                $merged = array_merge(
                    isset($entry) ? $entry->dump() : array(),
                    $this->request->getBody() ?: array()
                );

                $entry->set($merged)->save();

                h('notification.info', $this->clazz.' updated');

                h('controller.update.success', array(
                    'model' => $entry,
                ));
            } catch (Stop $e) {
                throw $e;
            } catch (Exception $e) {
                h('notification.error', $e);

                if (empty($entry)) {
                    $model = null;
                }

                h('controller.update.error', array(
                    'error' => $e,
                    'model' => $entry,
                ));
            }
        }

        $this->data['entry'] = $entry;
    }
993792
public function deleteAction($id)
    {
        /** @var PostInterface $post */
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

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

        $em = $this->getDoctrine()->getManager();
        $em->remove($post);
        $em->flush();

        return $this->redirectToRoute('opifer_form_post_index', ['formId' => $form->getId()]);
    }
1339360
public function updateAction($id)
    {
        $form = $this->getForm();
        // Get request
        $request = $this->get('request');
        if ('POST' == $request->getMethod()) {
            $form->submit($request);
            
            if ($form->isValid()) {
                // Save instance
                $this->getManager()->create($form->getData());
                $this->get('session')->getFlashBag()->add('success', 'Instance Redis updated successfully');

                return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
            }else {
                $this->get('session')->getFlashBag()->add('error', 'Some errors found');
            }
        }
        
        return $this->render(
            $this->getTemplatePath().'edit.html.twig',
            array(
                'form' => $form->createView(),
                'errors' => $form->getErrors()
            )
        );
    }
219765
public function deleteAddressAction($id)
    {
        if ('POST' !== $this->getCurrentRequest()->getMethod()) {
            throw new MethodNotAllowedHttpException(['POST']);
        }

        $address = $this->getAddressManager()->findOneBy(['id' => $id]);

        $this->checkAddress($address);

        $this->getAddressManager()->delete($address);

        $this->get('session')->getFlashBag()->add('sonata_customer_success', 'customer_address_delete');

        return new RedirectResponse($this->generateUrl('sonata_customer_addresses'));
    }
557669
public function cancel($id)
    {
        $campagne = $this->campagne->find($id);
        $this->mailjet->deleteCampagne($campagne->api_campagne_id);

        // Update campagne status
        $this->campagne->update(['id' => $campagne->id, 'status' => 'brouillon', 'updated_at' => date('Y-m-d G:i:s'), 'send_at' => null]);

        alert()->success('Envoi de la campagne annulé');

        return redirect('build/newsletter');
    }
1187545
public function update(Request $request, $id)
    {
        if ($request->input('action') == 'update_account') {
            try {
                $this->userRepositoryInterface->update($request->all(), $id);
            } catch (FormValidationException $e) {
                Flash::error($e->getMessage());

                return redirect()
                  ->route('account.edit')
                  ->withErrors($e->getErrors())
                  ->withInput();
            } catch (UsersException $e) {
                Flash::error($e->getMessage());

                return redirect()->route('dashboard.index');
            }

            Flash::success(trans('dashboard::dashboard.flash.account.success'));

            return redirect()->route('account.edit');
        }

        if ($request->input('action') == 'change_password') {
            try {
                $this->userRepositoryInterface->updatePassword($request->all());
            } catch (FormValidationException $e) {
                Flash::error($e->getMessage());

                return redirect()
                  ->route('account.edit')
                  ->withErrors($e->getErrors());
            } catch (AuthenticationException $e) {
                Flash::error(trans('dashboard::dashboard.flash.password.fail'));

                return redirect()
                  ->route('account.edit');
            }

            Flash::success(trans('dashboard::dashboard.flash.password.success'));

            return redirect()->route('account.edit');
        }
    }
879084
public function handleDelete(int $id = null)
    {
        if ($id === null) {
            if (isset($_GET['template']) === false) {
                return redirect($this->router->generate('pages-list-page') . "?m=2");
            } else {
                return 'Redirect: ' . $this->router->generate('pages-list-page') . "?m=2";
            }
        }
        $page = $this->core->api('Page/' . $id, 'DELETE')->run();
        if ($page['headers'][0][2] === 422) {
            if (isset($_GET['template']) === false) {
                return redirect($this->router->generate('pages-list-page') . "?m=2");
            } else {
                return 'Redirect: ' . $this->router->generate('pages-list-page') . "?m=2";
            }
        } elseif (($page["headers"][0][2] - 200) * ($page["headers"][0][2] - 299) > 0) {
            if (headers_sent() === false) {
                foreach ($page["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("500", [
                "error" => $page['response'],
                "result" => ''
            ]);
        }

        if (isset($_GET['template']) === false) {
            return redirect($this->router->generate('pages-list-page') . "?m=1");
        } else {
            return 'Redirect: ' . $this->router->generate('pages-list-page') . "?m=1";
        }
    }
1067870
public function update($id)
    {
        $user = $this->userRepo->getById($id);
        if (!empty($user)) {
            $this->authorize('update', $user);
            $input = $this->validator->bind('nick', ['user_id' => $user->id])->bind('email', ['user_id' => $user->id])
                ->validate('update');
            $user  = $this->userRepo->update($user, $input);
            return $this->respondWithSuccess($user, new UserTransformer());
        }
        return $this->respondNotFound();
    }
611695
public function update($id, PagesRequest $request)
    {
        $pages = $this->repository->find($id);

        if (empty($pages)) {
            Cms::notification('Page not found', 'warning');

            return redirect(route($this->routeBase.'.pages.index'));
        }

        $pages = $this->repository->update($pages, $request->all());
        Cms::notification('Page updated successfully.', 'success');

        if (!$pages) {
            Cms::notification('Page could not be saved.', 'warning');
        }

        return redirect(url()->previous());
    }
932746
public function update(Request $request, $id)
    {
        try {
            $this->permissionRepositoryInterface->update($request->all(), $id);
        } catch (FormValidationException $e) {
            Flash::error($e->getMessage());

            return redirect()
              ->route('permissions.edit', ['id' => $id])
              ->withErrors($e->getErrors())
              ->withInput();
        } catch (PermissionsException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('permissions.index');
        }

        Flash::success(trans('dashboard::dashboard.flash.permission.edit.success'));

        return redirect()->route('permissions.edit', ['id' => $id]);
    }
206942
public function actionRead($id)
    {
        $notification = $this->getNotification($id);

        $notification->seen = 1;
        $notification->save();

        return $notification;
    }
914901
public function getMessage($id)
    {
        $bodyLines = 0;
        $message = $this->_protocol->top($id, $bodyLines, true);

        return new $this->_messageClass(array('handler' => $this, 'id' => $id, 'headers' => $message,
                                              'noToplines' => $bodyLines < 1));
    }
560266
public function send($id, $notification) {
		$pushEntity = $this->prepareSend($notification);
		$fireUser = \App::$domain->account->fireUser->oneById($id);
		$fireBase = new FireBaseSend();
		return $fireBase->send('dYxtWvqaR1A:APA91bEIhkotwlCtW0ld-7A22U3bMM5kMI4MPd8lahQkmo95hpO_zukxDrKY9fwcYutud5DufyeE-g-9L9BoWycXJC1CravdFNR-wTUnYjvTyAtuJBKOmL4vgd2LD1FIGUtbuCwiokaR'
			, $pushEntity->toArray());
	}
568600
public function actionUpdate($id)
    {
        $emailTemplate = $this->loadModel($id);

        if (isset($_POST['EmailTemplate'])) {
            $emailTemplate->attributes = $_POST['EmailTemplate'];
            if ($emailTemplate->save()) {
                $this->redirect(array('template/view', 'id' => $emailTemplate->id));
            }
        }

        $this->render('update', array(
            'emailTemplate' => $emailTemplate,
        ));
    }