@param int $id

@return RedirectResponse
359989
public function resetAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $cron = $em->getRepository('OpiferCmsBundle:Cron')->find($id);

        $cron->setState(Cron::STATE_FINISHED);
        $cron->setLastError('');

        $em = $this->getDoctrine()->getManager();
        $em->persist($cron);
        $em->flush();

        return $this->redirectToRoute('opifer_cms_cronjob_index');
    }
504975
public function moveUpAction($id)
    {
        $repo   = $this->getDoctrine()->getManager()->getRepository($this->admin->getClass());
        $result = $repo->find($id);
        $repo->moveUp($result);

        if ($referer = $this->getRequest()->headers->get('referer')) {
            return $this->redirect($referer);
        } else {
            return new Response('<script>history.go(-1);</script>');
        }
    }
202806
public function delete($id = null) {
		$this->request->allowMethod('post');
		$log = $this->DatabaseLogs->get($id);

		if ($this->DatabaseLogs->delete($log)) {
			$this->Flash->success(__('Log deleted'));
			return $this->redirect(['action' => 'index']);
		}
		$this->Flash->error(__('Log was not deleted'));
		return $this->redirect(['action' => 'index']);
	}
380938
public function destroy($id)
    {
        $currentUser = $this->users->getUser();

        if ($currentUser->id === (int) $id)
        {
            return Redirect::back()
                ->with('error', Lang::get('cpanel::users.delete_denied') );
        }

        try
        {
            $this->users->delete($id);
            return Redirect::route('cpanel.users.index')
                ->with('success',Lang::get('cpanel::users.delete_success'));
        }
        catch (UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.index')
                ->with('error',$e->getMessage());
        }
    }
1049129
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        Yii::$app->authManager->remove($model->item);
        AccessHelper::refeshAuthCache();
        return $this->redirect(['index']);
    }
539176
public function delete($id)
    {
        try {
            $this->permissionRepositoryInterface->delete($id);
        } catch (PermissionsException $e) {
            Flash::error($e->getMessage());

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

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

        return redirect()->route('permissions.index');
    }
1326851
public function delete(int $id)
    {
        $this->cache->tags($this->getModel())->flush();
        return $this->repository->delete($id);
    }
589086
public function actionView($id)
    {
        Url::remember('', 'actions-redirect');
        $model = $this->findModel($id);

        return $this->render('view', [
            'model' => $model,
        ]);
    }
255414
public
    function destory($id)
    {
        $row = Model::find($id);
        $row->delete();
        flash()->success('Your Item Deleted');
        return redirect()->to(self::getScope().'/'.self::getModule($this));
    }
1023142
public function actionDelete($id)
    {
        $this->findModel($id)->updateAttributes(['status' => User::STATUS_DELETED]);

        return $this->redirect(['index']);
    }
1059444
public function run($id)
    {
        $model = $this->getModel($id);
        
        if ($model->restore()) {
            $this->addSuccessFlash();
        }

        return $this->redirect($model);
    }
1302021
public
    function destory($id)
    {
        $row = Model::find($id);
        $row->delete();
        flash()->success('Your Item Deleted');
        return redirect()->to("/menus");
    }
589118
public function actionAudit($id)
    {
        $model = $this->findModel($id);
        $model->setPublished();
        Yii::$app->getSession()->setFlash('success', Yii::t('article', 'Update success.'));
        return $this->redirect(Url::previous('actions-redirect'));
    }
608181
public function actionDelete($id)
{
try {
$this->findModel($id)->delete();
} catch (\Exception $e) {
$msg = (isset($e->errorInfo[2]))?$e->errorInfo[2]:$e->getMessage();
\Yii::$app->getSession()->addFlash('error', $msg);
return $this->redirect(Url::previous());
}

// TODO: improve detection
$isPivot = strstr('$id',',');
if ($isPivot == true) {
return $this->redirect(Url::previous());
} elseif (isset(\Yii::$app->session['__crudReturnUrl']) && \Yii::$app->session['__crudReturnUrl'] != '/') {
Url::remember(null);
$url = \Yii::$app->session['__crudReturnUrl'];
\Yii::$app->session['__crudReturnUrl'] = null;

return $this->redirect($url);
} else {
return $this->redirect(['index']);
}
}
568807
public function actionUpdate($id)
    {
        $this->layout = static::FORM_LAYOUT;
        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            $this->afterUpdate($model);

            if ($this->hasView) {
                return $this->redirect(['view', 'id' => $model->id]);
            } else {
                return $this->redirect(['index']);
            }
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
280416
public function flushDbAction($id)
    {
        try {
            $this->getWorker()->flushDB($id);
            
            $this->get('session')->getFlashBag()->add('success', 'Flush DB on '.$id.' executed successfully');
        }catch(\Exception $e) {
            $this->get('session')->getFlashBag()->add('success', 'Une erreur s\'est produite : '.$e->getMessage());
        }
        
        return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
    }
853855
public function actionDelete($id)
    {
        $this->findModel($id)->delete();
        MenuHelper::invalidate();

        return $this->redirect(['index']);
    }