@Route("/quit", name="vgr_team_quit")
@Method({"GET","POST"})
@Cache(smaxage="10")
@Security("is_granted('IS_AUTHENTICATED_REMEMBERED')")

@param Request $request
@return \Symfony\Component\HttpFoundation\Response
@throws \Exception
163596
public function quitAction(Request $request)
    {
        $form = $this->createFormBuilder()
            ->setAction($this->generateUrl('vgr_team_quit'))
            ->setMethod('POST')
            ->add('save', SubmitType::class, array('label' => 'QUIT'))
            ->getForm();

        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {

            /** @var \VideoGamesRecords\CoreBundle\Entity\Player $player */
            $player = $this->getDoctrine()->getRepository('VideoGamesRecordsCoreBundle:Player')->find($this->getPlayer()->getIdPlayer());
            $player->setTeam(null);

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

            //----- Message
            $this->addFlash(
                'notice',
                sprintf('Your changes were saved!!!')
            );

            return $this->redirectToRoute('vgr_account_index');
        }

        return $this->render(
            'VideoGamesRecordsTeamBundle:Form:form.html.twig',
            [
                'form' => $form->createView(),
            ]
        );
    }
928766
protected function requiresLogout(Request $request)
    {
        return isset($this->options['logout_path']) && $this->httpUtils->checkRequestPath($request, $this->options['logout_path']);
    }
424130
public function handleRequest($request)
    {
        list ($route, $params) = $request->resolve();
        $this->requestedRoute = $route;
        $result = $this->runAction($route, $params);
        if ($result instanceof Response) {
            return $result;
        } else {
            $response = $this->getResponse();
            $response->exitStatus = $result;

            return $response;
        }
    }
191309
protected function sendLockoutResponse(Request $request)
    {
        $seconds = $this->limiter()->availableIn(
            $this->throttleKey($request)
        );

        $message = Lang::get('auth.throttle', ['seconds' => $seconds]);

        $errors = [$this->username() => $message];

        if ($request->expectsJson()) {
            return api([], 422, $message);
        }

        return redirect()->back()
            ->withInput($request->only($this->username(), 'remember'))
            ->withErrors($errors);
    }
1139162
public function logout(Request $request)
    {
        $this->guard()->logout();

        $request->session()->invalidate();

        return redirect(route('admin.login'));
    }
1229268
public function delete(Request $request)
    {
        // AUTHORIZE ... COMES HERE
        $status = $this->pageBlockRepository->deleteById($request->get('pageblock_id'));
        return $status;
    }
185364
protected function sendLockoutResponse(Request $request)
    {
        $rateLimiter = App::make('Nova\Cache\RateLimiter');

        $seconds = $rateLimiter->availableIn($this->getThrottleKey($request));

        return Redirect::back()
            ->withInput($request->only($this->loginUsername(), 'remember'))
            ->withErrors(array(
                $this->loginUsername() => $this->getLockoutErrorMessage($seconds),
            ));
    }
246986
public function doLogout(Request $request)
    {
        \Auth::logout();
        $request->session()->flash('message', 'Succesvol uitgelogd');
        return redirect()->route('login.index');
    }
417491
public function removeAction(Request $request): Response
    {
        $isDraftForm = null !== $request->get(
            sprintf('version-remove-%s', VersionsTab::FORM_REMOVE_DRAFT)
        );

        $formName = $isDraftForm
            ? sprintf('version-remove-%s', VersionsTab::FORM_REMOVE_DRAFT)
            : sprintf('version-remove-%s', VersionsTab::FORM_REMOVE_ARCHIVED);

        $form = $this->formFactory->removeVersion(
            new VersionRemoveData(),
            $formName
        );
        $form->handleRequest($request);

        /** @var ContentInfo $contentInfo */
        $contentInfo = $form->getData()->getContentInfo();
        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (VersionRemoveData $data) {
                $contentInfo = $data->getContentInfo();

                foreach ($data->getVersions() as $versionNo => $selected) {
                    $versionInfo = $this->contentService->loadVersionInfo($contentInfo, $versionNo);
                    $this->contentService->deleteVersion($versionInfo);
                }

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Versions removed from '%name%' content.") */
                        'version.delete.success',
                        ['%name%' => $contentInfo->name],
                        'version'
                    )
                );

                return new RedirectResponse($this->generateUrl('_ezpublishLocation', [
                    'locationId' => $contentInfo->mainLocationId,
                    '_fragment' => VersionsTab::URI_FRAGMENT,
                ]));
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('_ezpublishLocation', [
            'locationId' => $contentInfo->mainLocationId,
            '_fragment' => VersionsTab::URI_FRAGMENT,
        ]));
    }
502024
public function destroy(TeamRequest $request, Team $team)
    {
        try {

            $team->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('team::team.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('team/team/0'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        }

    }
1202602
public function removeSessionAction(Request $request)
    {
        /** @var \Doctrine\Common\Persistence\ObjectManager $om */
        $om = $this->get($this->container->getParameter('ma27_api_key_authentication.object_manager'));

        if (!$header = (string) $request->headers->get($this->container->getParameter('ma27_api_key_authentication.key_header'))) {
            return new JsonResponse(['message' => 'Missing api key header!'], 400);
        }

        $user = $om
            ->getRepository($this->container->getParameter('ma27_api_key_authentication.model_name'))
            ->findOneBy([
                $this->getPropertyName(ClassMetadata::API_KEY_PROPERTY) => $header,
            ]);

        $this->get('ma27_api_key_authentication.auth_handler')->removeSession($user);

        return new JsonResponse([], 204);
    }
1022376
public function logout(Request $request)
    {
        $activeGuards = 0;
        $this->guard()->logout();

        foreach (config('auth.guards') as $guard => $guardConfig) {
            if ($guardConfig['driver'] === 'session') {
                if ($this->isActiveGuard($request, $guard)) {
                    $activeGuards++;
                }
            }
        }

        if ( ! $activeGuards) {
            $request->session()->flush();
            $request->session()->regenerate();
        }

        return redirect()->to($this->logoutToPath());
    }
818685
public function destroy(Request $request)
    {
        $this->validate($request, ['action' => 'in:delete,permadelete']);

        $permanent = !config('forum.preferences.soft_deletes') || ($request->input('action') == 'permadelete');

        $parameters = $request->all();
        $parameters['force'] = $permanent ? 1 : 0;

        $thread = $this->api('thread.delete', $request->route('thread'))->parameters($parameters)->delete();

        Forum::alert('success', 'threads.deleted', 1);

        return redirect($permanent ? Forum::route('category.show', $thread->category) : Forum::route('thread.show', $thread));
    }
368507
public function deleteAction(Request $request)
    {
        $siterootId = $request->get('id');

        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroot = $siterootManager->find($siterootId);
        $siterootManager->deleteSiteroot($siteroot);

        return new ResultResponse(true, 'Siteroot deleted.');
    }
495178
public function execAction(Request $request)
    {
        ignore_user_abort(true);
        set_time_limit(0);

        $this->get('anime_db.command')->execute($request->get('command'), 0);

        return new Response();
    }
112984
public function onLogoutSuccess(Request $request)
    {
        $jsonPolicy = new JsonResponsePolicy();

        if ($jsonPolicy->isAcceptable($request)) {
            return new JsonResponse([
                'error' => 0,
                'url' => $this->targetUrl,
            ]);
        } else {
            return $this->httpUtils->createRedirectResponse($request, $this->targetUrl);
        }
    }
242497
protected function sendLockoutResponse( Request $request )
	{
		$seconds = $this->secondsRemainingOnLockout( $request );

		return redirect()->back()->withInput( $request->only( $this->loginUsername(), 'remember' ) )->withErrors( [
				$this->loginUsername() => $this->getLockoutErrorMessage( $seconds ),
			] );
	}