Deletes the history entry with the given id

@param string $ids
@param bool   $withFiles

@return array
325214
public function deleteHistoryEntries($ids, $withFiles = true)
    {
        $params = [
            'name'      => 'delete',
            'del_files' => $withFiles,
            'value'     => implode(',', $ids)
        ];
        $url = $this->buildUrl('history', $params);

        $request = $this->guzzle->request('GET', $url);

        return json_decode($request->getBody(), true)['status'];
    }
997637
public function delete($fileIDs)
    {
        if (is_array($fileIDs)) {
            $fileIDs = implode(',', $fileIDs);
        }

        $data = [
            'file_ids' => $fileIDs
        ];

        return $this->post('files/delete', $data, \true);
    }
514469
public function ids($ids)
    {
        $ids = is_array($ids) ? $ids : [$ids];

        $query = new IdsQuery($ids);

        $this->append($query);

        return $this;
    }
918793
public function removeMany(array $ids) {
		$result = true;
		
		foreach ($ids as $id) {
			if (! apc_delete($id)) {
				$result = false;
			}
		}
		
		return $result;
	}
300490
public function deleteUsers(array $ids): void
	{
		if ($this->isAjax()) {
			$users = $this->orm->users->findById($ids);
			foreach ($users as $user) {
				$this->orm->users->remove($user);
			}
			$this->orm->flush();
			$this['userList']->reload();
		} else {
			$this->terminate();
		}
	}
533498
protected function delete_dimensions(array $ids) {
        global $DB;

        $fs = get_file_storage();
        foreach ($ids as $id) {
            if (!empty($id)) {   // to prevent accidental removal of all files in the area
                $fs->delete_area_files($this->workshop->context->id, 'workshopform_rubric', 'description', $id);
            }
        }
        $DB->delete_records_list('workshopform_rubric', 'id', $ids);
    }
47955
public function deleteItems( array $ids )
	{
		$path = 'mshop/customer/manager/typo3/delete';
		$this->deleteItemsBase( $ids, $path, false, 'uid' );

		$manager = $this->getObject()->getSubManager( 'address' );
		$search = $manager->createSearch()->setSlice( 0, 0x7fffffff );
		$search->setConditions( $search->compare( '==', 'customer.address.parentid', $ids ) );
		$manager->deleteItems( array_keys( $manager->searchItems( $search ) ) );

		$manager = $this->getObject()->getSubManager( 'lists' );
		$search = $manager->createSearch()->setSlice( 0, 0x7fffffff );
		$search->setConditions( $search->compare( '==', 'customer.lists.parentid', $ids ) );
		$manager->deleteItems( array_keys( $manager->searchItems( $search ) ) );

		$manager = $this->getObject()->getSubManager( 'property' );
		$search = $manager->createSearch()->setSlice( 0, 0x7fffffff );
		$search->setConditions( $search->compare( '==', 'customer.property.parentid', $ids ) );
		$manager->deleteItems( array_keys( $manager->searchItems( $search ) ) );
	}
692726
protected function deleteByIds(ActivityListener $listener, array $ids)
    {
        $logs = Logs::query()->whereIn('id', $ids);
        if (!$logs->delete()) {
            return $listener->deleteFailed();
        }
        return $listener->deleteSuccess();
    }
547081
public function deletePermissions(array $ids): void
	{
		if ($this->isAjax()) {
			$permissions = $this->orm->acl->findById($ids);
			foreach ($permissions as $permission) {
				$this->orm->acl->remove($permission);
			}
			$this->orm->flush();
			$this['permissionsList']->reload();
		} else {
			$this->terminate();
		}
	}
774314
public function deleteBatch(array $ids)
    {
        $supported = $this->isSupported('deleteBatch');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/batch/delete', array('ids' => $ids), 'DELETE') : $supported;
    }
191696
public function delete($appId, array $ids, $guestSpaceId = null, array $revisions = []): array
    {
        $options = ['json' => ['app' => $appId, 'ids' => $ids]];
        if (count($revisions) && count($ids) === count($revisions)) {
            $options['json']['revisions'] = $revisions;
        }

        /** @var JsonStream $stream */
        $stream = $this->client
            ->delete(KintoneApi::generateUrl('records.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
1258109
public function deleteMany($ids = null)
    {
        if (is_null($ids)) {
            $parameters = [
                'performAll' => true
            ];
        } else {
            $parameters = [
                'ids' => implode(',', (array) $ids),
            ];
        }

        $response = $this->ontraport->delete(
            $this->getNamespace(), $this->toArray($parameters)
        );

        // When deleting many objects, we get a string for the data field in the response,
        // saying "Deleted". When an object does not exist, it is ignored by oap. I believe
        // its safe to assume that we can always return successfuly here. Unless we receive
        // a non 200 status code in which case an InvalidRequest would be thrown.

        return true;
    }
1336461
private function executeDestroy($ids){

        $models = User::find($ids);

        User::destroy($ids);

        event(new UserRemoved($models->toJson()));

        return Response::json(['deleted' => true ]);
    }
161275
private static function criteriaWithSoftDelete(array $criteria, bool $withTrash = false)
    {
        $c = [];
        foreach ($criteria as $key => $value) {
            if ($key !== 'deletedAt') {
                $c[$key] = $value;
            }
        }
        if (!$withTrash) {
            $c['deletedAt'] = null;
        }
        return $c;
    }
385457
protected function deleteFiles($type = 'delete', $withEmptyDirs = false)
    {
        $deleteList = $this->getDeleteList($type);

        if (!empty($deleteList)) {
            return $this->getFileManager()->remove($deleteList, null, $withEmptyDirs);
        }

        return true;
    }
618062
public function detach($ids = [])
    {
        if ($ids instanceof EntityCollection) {
            $ids = (array) $ids->modelKeys();
        }

        $query = $this->newPivotQuery();

        // If associated IDs were passed to the method we will only delete those
        // associations, otherwise all of the association ties will be broken.
        // We'll return the numbers of affected rows when we do the deletes.
        $ids = (array) $ids;

        if (count($ids) > 0) {
            $query->whereIn($this->otherKey, (array) $ids);
        }

        // Once we have all of the conditions set on the statement, we are ready
        // to run the delete on the pivot table. Then, if the touch parameter
        // is true, we will go ahead and touch all related models to sync.
        return $query->delete();
    }
1260520
protected function delete_dimensions(array $ids) {
        global $DB, $PAGE;

        $fs = get_file_storage();
        foreach ($ids as $id) {
            if (!empty($id)) {   // to prevent accidental removal of all files in the area
                $fs->delete_area_files($PAGE->context->id, 'workshopform_accumulative', 'description', $id);
            }
        }
        $DB->delete_records_list('workshopform_accumulative', 'id', $ids);
    }