Deletes a PaymentServiceProvider entity.

@Route("/{id}")
@Method("DELETE")
@Template()
353299
public function deleteAction(Request $request, PaymentServiceProvider $paymentServiceProvider)
    {
        $form = $this->createDeleteForm($paymentServiceProvider);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->remove($paymentServiceProvider);
            $em->flush();
        }

        return $this->redirectToRoute('ecommerce_paymentserviceprovider_index');
    }
927258
public function deleteAction(Request $request, $id)
    {

        $em = $this->getDoctrine()->getManager();
        $entity = $em->getRepository('EcommerceBundle:Transaction')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Transaction entity.');
        }

        $em->remove($entity);
        $em->flush();
        
         $this->get('session')->getFlashBag()->add('info', 'transaction.deleted');
         
        return array();
    }
328562
def delete(self):
        
        self.requester.delete(
            '/{endpoint}/{id}', endpoint=self.endpoint,
            id=self.id
        )
        return self
977572
public function delete()
    {
        if (!$this->hasId()) {
            throw new DeleteException('ID not set - did you call find($id) before delete()?');
        }

        if (!$this->isDeletable()) {
            throw new DeleteException('Permission denied: Entity can not be deleted');
        }

        $this->transactional(function () {
            $this->forceDelete();
        });

        return $this;
    }
467207
public function deleteAction(Request $request, $id)
    {
        $locale = $this->getLocale($request);

        $delete = function ($id) use ($locale){
            $this->getManager()->delete($id, $this->getUser()->getId());
        };
        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
568627
public function deleteAction()
    {
        $model = $this->getModel();
        $model->applyRequest($this->getRequest());

        $model->delete();
        $this->_reroute(array($this->getRequest()->getActionKey() => 'index', MUTil_Model::REQUEST_ID => null));
    }
75537
public static com.liferay.commerce.model.CommerceOrderPayment deleteCommerceOrderPayment(
		com.liferay.commerce.model.CommerceOrderPayment commerceOrderPayment) {
		return getService().deleteCommerceOrderPayment(commerceOrderPayment);
	}
1112687
protected function delete()
    {
        foreach ($this->scheduledForDeletion as $objectHashId => $entity) {
            $dataMapper = $this->getDataMapper($this->entityRegistry->getClassName($entity));
            $dataMapper->delete($entity);

            // Order here matters
            $this->detach($entity);
            $this->entityRegistry->setState($entity, EntityStates::DEQUEUED);
        }
    }
963723
@Override
    public void delete(final I id) {
        if (entity != null) {
            inTransaction(
                    new Callable<Void>() {
                        @Override
                        public Void call() throws Exception {
                            final T entity = findOne(id);
                            T attached = getAttached(entity);
                            if (attached != null) {
                                entityManager.remove(attached);
                            }
                            return null;
                        }
                    }
            );
        }
    }
1254494
public function deleteProduct($product_id)
    {
        if (isset($this->_products[$product_id]["trial"]))
        {
            $this->deleteTrial($product_id);
        }
        if (isset($this->_products[$product_id]["subscription"]))
        {
            $this->deleteSubscription($product_id);
        }
        if (isset($this->_products[$product_id]["payment_plan"]))
        {
            $this->deletePaymentPlan($product_id);
        }
        unset($this->_products[$product_id]);

        return $this->_products;
    }
1211300
public function deleteAction(Request $request, $id)
    {
        $this->init($request);
        /* @var Node $node */
        $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id);

        $this->denyAccessUnlessGranted(PermissionMap::PERMISSION_DELETE, $node);

        $nodeTranslation = $node->getNodeTranslation($this->locale, true);
        $nodeVersion = $nodeTranslation->getPublicNodeVersion();
        $page = $nodeVersion->getRef($this->em);

        $this->get('event_dispatcher')->dispatch(
            Events::PRE_DELETE,
            new NodeEvent($node, $nodeTranslation, $nodeVersion, $page)
        );

        $node->setDeleted(true);
        $this->em->persist($node);

        $children = $node->getChildren();
        $this->deleteNodeChildren($this->em, $this->user, $this->locale, $children);
        $this->em->flush();

        $event = new NodeEvent($node, $nodeTranslation, $nodeVersion, $page);
        $this->get('event_dispatcher')->dispatch(Events::POST_DELETE, $event);
        if (null === $response = $event->getResponse()) {
            $nodeParent = $node->getParent();
            // Check if we have a parent. Otherwise redirect to pages overview.
            if ($nodeParent) {
                $url = $this->get('router')->generate(
                    'KunstmaanNodeBundle_nodes_edit',
                    array('id' => $nodeParent->getId())
                );
            } else {
                $url = $this->get('router')->generate(
                    'KunstmaanNodeBundle_nodes'
                );
            }
            $response = new RedirectResponse($url);
        }

        $this->addFlash(
            FlashTypes::SUCCESS,
            $this->get('translator')->trans('kuma_node.admin.delete.flash.success')
        );

        return $response;
    }
450406
public function deleteAction($id, Request $request)
    {
        $delete = function($id) use ($request) {
            $account = $this->getRepository()->findAccountByIdAndDelete($id);

            if (!$account) {
                throw new EntityNotFoundException($this->getAccountEntityName(), $id);
            }

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

            $addresses = $account->getAddresses();
            /** @var AddressEntity $address */
            foreach ($addresses as $address) {
                if (!$address->hasRelations()) {
                    $em->remove($address);
                }
            }

            // Remove related contacts if removeContacts is true.
            if (null !== $request->get('removeContacts') &&
                'true' == $request->get('removeContacts')
            ) {
                foreach ($account->getAccountContacts() as $accountContact) {
                    $em->remove($accountContact->getContact());
                }
            }

            $em->remove($account);
            $em->flush();
        };

        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
939031
private function deleteById($id)
    {
        $builder = $this->repository->createQueryBuilder();
        $builder
            ->remove()
            ->field('id')->equals($id)
            ->getQuery()
            ->execute();
    }
1087417
public function delete(ResourceManager $resourceManager, ApiRequest $request, int $version, string $resource, $id)
    {
        $resourceManager->version($version);

        /** @var \Ipunkt\LaravelJsonApi\Contracts\RequestHandlers\HandlesDeleteRequest $handler */
        $handler = $this->initializeHandler($resourceManager, $resource, $request, HandlesDeleteRequest::class);

        $handler->delete($id, $request);

        return $this->respondNoContent();
    }
442467
function delete($id)
    {
        $this->requestDecorator->setId($id);
        $result = $this->client->delete($this->requestDecorator->makeResource(), $this->requestDecorator->makeHeaders());
        $this->refresh();
        return $result;
    }
1007289
public void delete( Payment payment ) {
    RestfulUtils.delete( PaymentService.PATH, payment, Payment.class, super.httpClient );
  }
509531
public function delete($id = null)
	{
		$wheres = $this->compileWheres();

		foreach ($this->get() as $entity)
		{
			$this->collection->remove($entity);
		}
	}