Removes a list of analytics.

@param Request $request
@param $webspace

@return Response
439011
public function cdeleteAction(Request $request, $webspace)
    {
        $ids = array_filter(explode(',', $request->get('ids', '')));

        $this->get('sulu_website.analytics.manager')->removeMultiple($ids);
        $this->get('doctrine.orm.entity_manager')->flush();
        $this->get('sulu_website.http_cache.clearer')->clear();

        return $this->handleView($this->view(null, 204));
    }
1269672
public function deleteBulkAction(Request $request, $class)
    {
        /** @var Workspace[] $workspaces */
        $workspaces = parent::decodeIdsString($request, Workspace::class);
        $errors = [];

        foreach ($workspaces as $workspace) {
            $notDeletableResources = $this->resourceManager->getNotDeletableResourcesByWorkspace($workspace);

            if (count($notDeletableResources)) {
                $errors[$workspace->getUuid()] = $this->translator->trans(
                    'workspace_not_deletable_resources_error_message',
                    ['%workspaceName%' => $workspace->getName()],
                    'platform'
                );
            }
        }
        if (empty($errors)) {
            parent::deleteBulkAction($request, Workspace::class);

            return new JsonResponse('success', 200);
        } else {
            $validIds = [];
            $ids = $request->query->get('ids');

            foreach ($ids as $id) {
                if (!isset($errors[$id])) {
                    $validIds[] = $id;
                }
            }
            if (count($validIds) > 0) {
                $request->query->set('ids', $validIds);
                parent::deleteBulkAction($request, 'Claroline\CoreBundle\Entity\Workspace\Workspace');
            }

            return new JsonResponse(['errors' => $errors], 422);
        }
    }
1144473
public function onLogoutSuccess(Request $request)
    {
        phpCAS::setDebug($this->cas->getDebug());
        phpCAS::setVerbose($this->cas->isVerbose());
        if (!phpCAS::isInitialized()) {
            phpCAS::client(
                $this->cas->getVersion(),
                $this->cas->getHostname(),
                $this->cas->getPort(),
                $this->cas->getUrl()
            );
        }
        phpCAS::setLang($this->cas->getLanguage());

        if ($this->cas->isRedirectingAfterLogout()) {
            $uri = $this->router->generate(
                $this->cas->getRouteLogout(),
                [],
                UrlGeneratorInterface::ABSOLUTE_URL
            );
            phpCAS::logoutWithRedirectService($uri);
        } else {
            //simple logout
            phpCAS::logout();
        }
    }
909930
public function deleteStatusesAction(Request $request)
    {
        $format = $request->get('_format', 'json');

        $facade = $this->get('jms_serializer')->deserialize(
            $request->getContent(),
            $this->getParameter('open_orchestra_workflow_admin.facade.status_collection.class'),
            $format
        );
        $statusRepository = $this->get('open_orchestra_model.repository.status');
        $statuses = $this->get('open_orchestra_api.transformer_manager')->reverseTransform('status_collection', $facade);

        $statusIds = array();
        foreach ($statuses as $status) {
            if ($this->isDeleteGranted($status)) {
                $statusIds[] = $status->getId();
                $this->dispatchEvent(StatusEvents::STATUS_DELETE, new StatusEvent($status));
            }
        }
        $statusRepository->removeStatuses($statusIds);

        return array();
    }
82754
public function removePaymentAction(Request $request)
    {
        $context = $this->loadContext($request);
        /** @var \Ekyna\Component\Sale\Order\OrderInterface $order */
        $order = $context->getResource();

        $this->isGranted('EDIT', $order);

        if (null === $payment = $order->findPaymentById($request->attributes->get('paymentId'))) {
            throw new NotFoundHttpException('Payment not found.');
        }
        if ($payment->getState() !== PaymentStates::STATE_NEW) {
            throw new NotFoundHttpException('Payment is not new.');
        }

        $redirectPath = $this->generateResourcePath($order);
        $action = $this->generateUrl('ekyna_order_order_admin_payment_remove', [
            'orderId' => $order->getId(),
            'paymentId' => $payment->getId(),
        ]);
        $form = $this->createRemovePaymentForm($action, $redirectPath);

        $form->handleRequest($request);
        if ($form->isValid()) {
            $order->removePayment($payment);

            $event = new OrderEvent($order);
            $this->get('event_dispatcher')->dispatch(OrderEvents::CONTENT_CHANGE, $event);
            if (!$event->isPropagationStopped()) {
                return $this->redirect($redirectPath);
            }
        }

        $this->appendBreadcrumb(
            'order-payment-remove',
            'ekyna_order.payment.button.remove'
        );

        return $this->render('EkynaOrderBundle:Admin/Order/Payment:remove.html.twig', [
            'form' => $form->createView(),
            'order' => $order,
        ]);
    }
647671
public function delete($request)
    {
        $entriesCleared = 0;

        if ($this->exists($request)) {
            foreach ($this->entries as $entry) {
                if ($entry['cacheData']) {
                    // delete each results of the manifest
                    if ($this->cache->delete($entry['cacheData'])) {
                        $entriesCleared++;
                    }
                }
            }
            // delete the manifest of data source
            $this->cache->delete($this->key);
        }
        return $entriesCleared;
    }
355476
public function deleteAction($webspace, $id)
    {
        $this->get('sulu_website.analytics.manager')->remove($id);
        $this->get('doctrine.orm.entity_manager')->flush();
        $this->get('sulu_website.http_cache.clearer')->clear();

        return $this->handleView($this->view(null, 204));
    }
571620
public function deleteAction(Request $request, $id)
    {
        $locale = $this->getLocale($request);
        $webspaceKey = $request->query->get('webspace', null);

        $references = $this->snippetRepository->getReferences($id);

        if (count($references) > 0) {
            $force = $request->headers->get('SuluForceRemove', false);
            if ($force) {
                $this->contentMapper->delete($id, $webspaceKey, true);
            } else {
                return $this->getReferentialIntegrityResponse($webspaceKey, $references, $id, $locale);
            }
        } else {
            $this->contentMapper->delete($id, $webspaceKey);
        }

        return new JsonResponse();
    }
1236538
public function cdeleteAction(Request $request)
    {
        $manager = $this->getTaskManager();

        $ids = array_filter(explode(',', $request->get('ids')));
        foreach ($ids as $id) {
            $manager->remove($id);
        }

        $this->getEntityManager()->flush();

        return $this->handleView($this->view());
    }
560274
private function clearRequest(AuthorizationRequest $request)
    {
        /** @var Client $client */
        $client = $request->getClient();
        $clientId = $client->getClientKey();
        $this->session->remove("authn_request.$clientId");
    }
143857
public void removeFromSession( HttpServletRequest request )
    {
        StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler();
        HttpServletRequest unwrappedRequest = PageFlowUtils.unwrapMultipart( request );
        RequestContext rc = new RequestContext( unwrappedRequest, null );
        String attrName =
                ScopedServletUtils.getScopedSessionAttrName( InternalConstants.FACES_BACKING_ATTR, unwrappedRequest );
        
        sh.removeAttribute( rc, attrName );
    }
1290431
public function deleteAjaxAction( Request $request ) {
		$id          = $request->get( 'id' );
		$pageId      = $request->get( 'pageId' );
		$uniqId      = $request->get( 'uniqId' );
		$code        = $request->get( 'code' );
		$formFieldId = $request->get( 'formFieldId' );

		if ( $id ) {
			$layoutBlock = $this->admin->getObject( $id );
			if ( $layoutBlock ) {
				$this->admin->delete( $layoutBlock );
			}
		}
		$html = $this->getLayoutBlockFormWidget( $pageId, $formFieldId, $uniqId, $code );

		return new JsonResponse( [
			'messageStatus' => 'success',
			'message'       => $this->translate( 'message.layout_block_deleted' ),
			'html'          => $html,
		] );
	}
50802
public function cdeleteAction($id, Request $request)
    {
        list($webspaceKey, $languageCode) = $this->getWebspaceAndLanguage($request);
        $path = $this->getRequestParameter($request, 'ids', true); // TODO rename path to id in all function names

        $this->getResourceLocatorRepository()->delete($path, $webspaceKey, $languageCode);
        $this->getDocumentManager()->flush();

        return $this->handleView($this->view());
    }
689490
public function listAction(Request $request)
    {
        $current_page = $request->get('page', 1);
        $current_page = $current_page > 1 ? $current_page : 1;
        $rep = $this->getRepository();

        // filter list notice
        $filter = $this->createForm('notices_filter')->handleRequest($request);
        if ($filter->isValid()) {
            $query = $rep->getFilteredQuery($filter->getData()['status'], $filter->getData()['type']);
        } else {
            $query = $rep->createQueryBuilder('n');
        }
        $query
            ->orderBy('n.date_created', 'DESC')
            ->setFirstResult(($current_page - 1) * self::NOTICE_PER_PAGE)
            ->setMaxResults(self::NOTICE_PER_PAGE);
        $list = $query->getQuery()->getResult();

        // get count all items
        $count = $query
            ->select('COUNT(n)')
            ->getQuery()
            ->getSingleScalarResult();

        // pagination
        $that = $this;
        $request_query = $request->query->all();
        unset($request_query['page']);
        $pagination = $this->get('anime_db.pagination')
            ->create(ceil($count / self::NOTICE_PER_PAGE), $current_page)
            ->setPageLink(function ($page) use ($that, $request_query) {
                return $that->generateUrl('notice_list', array_merge($request_query, ['page' => $page]));
            })
            ->setFirstPageLink($this->generateUrl('notice_list', $request_query))
            ->getView();

        return $this->render('AnimeDbCatalogBundle:Notice:list.html.twig', [
            'list' => $list,
            'pagination' => $pagination,
            'change_form' => $this->createForm(new ChangeNotice())->createView(),
            'filter' => $filter->createView(),
            'action_remove' => ChangeNotice::ACTION_REMOVE,
        ]);
    }
917313
public function destroy(NewsCategory $category, Request $request)
	{
		$this->deleteEntry($category, $request);

        return redirect_to_resource();
	}
380565
public function extract(Request $request)
    {
        $trackingParameters = new ParameterBag();

        /** Get value from cookies. */
        foreach ($this->extracters as $extracter) {
            if ($extracter instanceof TrackingParameterCookieExtracterInterface) {
                $trackingParameters->add($extracter->extractFromCookies($request->cookies));
            }
        }

        /** Override cookies' value by query's value if set. */
        foreach ($this->extracters as $extracter) {
            if ($extracter instanceof TrackingParameterQueryExtracterInterface) {
                $trackingParameters->add($extracter->extractFromQuery($request->query));
            }
        }

        return $trackingParameters;
    }
1013528
public function deleteAction(Request $request)
    {
        if ($this->submitForm($this->buildForm(CsrfProtectionType::class), $request)->isValid()) {
            try {
                $this->getDomainManager()->delete($this->find('delete'));
            } catch (DomainException $e) {
                $this->processException($e);
            }
        }

        return $this->processAction('delete');
    }