@ApiDoc(
description="Remove an array of object of class $class.",
queryString={
{"name": "ids[]", "type": {"string", "integer"}, "description": "The object id or uuid."}
}
)

@param Request $request
@param string  $class

@return JsonResponse
324912
public function deleteBulkAction(Request $request, $class)
    {
        $query = $request->query->all();
        $options = $this->options['deleteBulk'];

        if (isset($query['options'])) {
            $options = $query['options'];
        }

        $this->crud->deleteBulk(
            $this->decodeIdsString($request, $class),
            $options
        );

        return new JsonResponse(null, 204);
    }
404848
public function removeAction(Request $request)
    {
        $row = $this->findRowByRequest($request);
        $container = $row->getContainer();

        try {
            $this->getEditor()->getRowManager()->delete($row);
        } catch (EditorExceptionInterface $e) {
            return $this->handleException($e);
        }

        // Stores id for front removal
        $removedId = $this->getViewBuilder()->buildRow($row)->getAttributes()->getId();

        $this->validate($container);
        $this->persist($container);

        $data = [
            'removed' => [$removedId],
            //'containers' => [$this->getViewBuilder()->buildContainer($container)],
        ];

        return $this->buildResponse($data, self::SERIALIZE_LAYOUT);
    }
612343
protected static function deleteTaxClassByIdAsyncWithHttpInfo($tax_class_id) 
    {
        $returnType = '';  
        $request = self::deleteTaxClassByIdRequest($tax_class_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
1009440
public function hook(Request $request): JsonResponse
    {
        (new Collection($request->input('events', [])))
            ->filter(function ($event): bool {
                return Arr::get($event, 'name') === 'channel_vacated';
            })
            ->each(function (array $event): void {
                $this->storage->deleteSubscriber(
                    Arr::get($event, 'channel')
                );
            });

        return response()->json(['message' => 'okay']);
    }
1374454
private static function transformObject(\stdClass $json, $class, $callback)
    {
        if (is_string($class)) {
            $object = new $class();
        } else {
            $object = $class;
        }

        foreach (static::getPropertyMapping($object) as $destination => $source) {
            static::map($json, $source, $object, $destination);
        }

        if ($callback) {
            call_user_func_array($callback, array($object));
        }

        return $object;
    }
349054
public function remove($key, $class = null) {
			
		if (isset($this->_data[$key])) {
			
			if (empty($class) || $this->_data[$key] instanceof $class) {
				unset($this->_data[$key]);
			}
		}
		
		if (isset($this->registered[$key])) {
			
			if (empty($class) || $class === $this->registered[$key]) {
				unset($this->registered[$key]);
			}
		}
		
		return $this;
	}
1271448
public function deleteSoft(HCResourceGrabPropertyRequest $request): JsonResponse
{
    $this->connection->beginTransaction();

    try {
        $this->service->getRepository()->deleteSoft($request->getListIds());

        $this->connection->commit();
    } catch (\Throwable $exception) {
        $this->connection->rollBack();

        return $this->response->error($exception->getMessage());
    }

    return $this->response->success('Successfully deleted');
}
277103
public function removeClassProperty()
    {
        $success = false;
        if(!$this->isXmlHttpRequest()){
            throw new common_exception_BadRequest('wrong request mode');
        }

        $class = $this->getClass($this->getRequestParameter('classUri'));
        $property = $this->getProperty($this->getRequestParameter('uri'));

        //delete property mode
        foreach($class->getProperties() as $classProperty) {
            if ($classProperty->equals($property)) {

                $indexes = $property->getPropertyValues($this->getProperty(OntologyIndex::PROPERTY_INDEX));
                //delete property and the existing values of this property
                if($property->delete(true)){
                    //delete index linked to the property
                    foreach($indexes as $indexUri){
                        $index = $this->getResource($indexUri);
                        $index->delete(true);
                    }
                    $success = true;
                    break;
                }
            }
        }

        if ($success) {
            $this->returnJson(array(
                'success' => true
            ));
            return;
        } else {
            $this->returnError(__('Unable to remove the property.'));
        }
    }
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,
		] );
	}
699814
public function cdeleteAction(Request $request)
    {
        $ids = explode(',', $request->get('ids'));
        if ($ids && count($ids) > 0) {
            try {
                $this->getManager()->batchDelete($ids);
                $view = $this->view($ids, 204);
            } catch (FilterNotFoundException $exc) {
                $exception = new EntityNotFoundException($exc->getEntityName(), $exc->getId());
                $view = $this->view($exception->toArray(), 404);
            }
        } else {
            $exception = new InvalidArgumentException(static::$entityName, $ids);
            $view = $this->view($exception->toArray(), 400);
        }

        return $this->handleView($view);
    }
1328229
public function send(Request $request)
    {
        $response     = new SearchResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);
        $json         = $httpResponse->json();
        $result       = $json['response'];

        $response->docs     = $result['docs'];
        $response->numFound = $result['numFound'];
        $response->maxScore = $result['maxScore'];
        $response->docs     = array_map([$this, 'docToArray'], $result['docs']);

        return $response;
    }
297258
public function delete(Request $request)
    {
        $category = $this->category->find($request->get('category'));

        if (!$category) {
            return Response::json(['errors' => true]);
        }

        $this->category->destroy($category);

        return Response::json(['errors' => false]);
    }
1261279
public function listUsersAction($id, $class, Request $request)
    {
        return new JsonResponse(
            $this->finder->search('Claroline\CoreBundle\Entity\User', array_merge(
                $request->query->all(),
                ['hiddenFilters' => [$this->getName() => [$id]]]
            ))
        );
    }
661888
private function deserialize(string $class, string $json)
    {
        try {
            return $this->serializer->deserialize($json, $class, 'atol_client');
        } catch (\RuntimeException $exception) {
            throw ParseException::becauseOfRuntimeException($exception, ParseException::RESPONSE);
        }
    }
846294
public function removeClass($class)
    {
        if (!is_array($class)) {
            $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
        }
        $curClass = array_diff(
            preg_split('/\s+/', $this->getAttribute('class'),
                       null, PREG_SPLIT_NO_EMPTY),
            $class
        );
        if (0 == count($curClass)) {
            $this->removeAttribute('class');
        } else {
            $this->setAttribute('class', implode(' ', $curClass));
        }
        return $this;
    }
1152072
public function createAction(Request $request, $class)
    {
        $data = $this->decodeRequest($request);

        //THIS IS FOR WORKSPACE IMPORT FROM ARCHIVE. IT'S CURRENTLY NOT TESTED (AND THEREFORE BROKEN)
        if (isset($data['archive'])) {
            $workspace = $this->importer->create($data, new Workspace());
            $this->toolManager->addMissingWorkspaceTools($workspace);

            return new JsonResponse(
                $this->serializer->serialize($workspace, $this->options['get']),
                201
            );
        }

        /** @var Workspace $workspace */
        $workspace = $this->crud->create(
            $class,
            $data,
            [Options::LIGHT_COPY]
        );

        if (is_array($workspace)) {
            return new JsonResponse($workspace, 400);
        }

        $model = $workspace->getWorkspaceModel();
        $logFile = $this->getLogFile($workspace);
        $logger = new JsonLogger($logFile);
        $this->workspaceManager->setLogger($logger);
        $workspace = $this->workspaceManager->copy($model, $workspace, false);
        $logger->end();

        return new JsonResponse(
            $this->serializer->serialize($workspace, $this->options['get']),
            201
        );
    }
539428
public function requestRememberPasswordAction(Request $request, $userClass)
    {
        $form = $this->get('form.factory')->createNamedBuilder('', RequestRememberPasswordType::class, null, [
            'csrf_protection' => false,
        ])->getForm();

        $form->handleRequest($request);
        if ($form->isValid()) {
            try {
                $this->get('bengor_user.' . $userClass . '.api_command_bus')->handle(
                    $form->getData()
                );

                return new JsonResponse();
            } catch (UserDoesNotExistException $exception) {
                return new JsonResponse(
                    sprintf(
                        'The "%s" user email does not exist ',
                        $form->getData()->email()
                    ),
                    400
                );
            }
        }

        return new JsonResponse(FormErrorSerializer::errors($form), 400);
    }