Deletes the storage data related to the given Resource object

@param \Neos\Flow\ResourceManagement\PersistentResource $resource The Resource to delete the storage data of
@return boolean TRUE if removal was successful
@api
198743
public function deleteResource(PersistentResource $resource)
    {
        $this->s3Client->deleteObject(array(
            'Bucket' => $this->bucketName,
            'Key' => $this->keyPrefix . $resource->getSha1()
        ));
        return true;
    }
109960
public function deleteAction( $resource )
	{
		$response = $this->createAdmin( $resource )->delete( $this->getPsrRequest(), new Response() );
		return $this->setPsrResponse( $response );
	}
28409
public function deleteResource(\core_kernel_classes_Resource $resource)
    {
        $link = $this->getLink($resource);
        return parent::deleteResource($resource) && $this->getFileManager()->deleteFile($link);
    }
1145015
protected function sendDeleteRequest($resource)
    {
        $response = $this->sendRequest(
            'DELETE',
            $this->getServiceUrl($resource),
            [
                'headers' => [
                    'Accept' => 'application/x-yametrika+json',
                    'Content-Type' => 'application/x-yametrika+json',
                    'Authorization' => 'OAuth ' . $this->getAccessToken(),
                ]
            ]
        );

        return $this->getDecodedBody($response->getBody());
    }
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();
    }
1313965
public static function toSerialize($resource) {
		if (!self::isArray($resource)) {
			$resource = self::toArray($resource);
		}

		return serialize($resource);
	}
504814
public function execute($resource = null)
    {
        if (null === $resource) {
            throw new QueryErrorException('Could not delete no resource');
        }

        $this->populateCDNResources();

        $cdnResources = array_filter($this->cdnResources, function($value, $key) use ($resource) {
            return $value['cname'] == $resource;
        }, ARRAY_FILTER_USE_BOTH);

        if (count($cdnResources) > 1) {
            throw new QueryErrorException('Could not delete more than one resource');
        }

        foreach ($cdnResources as $cdnResource) {
            $response = $this->client->post($this->url, [
                'form_params' => [
                    'id' => $cdnResource['id'],
                    'login' => $this->login,
                    'passwd' => $this->password,
                ]
            ]);
            $data = json_decode($response->getBody()->getContents(), true);

            if ('ok' !== $data['status']) {
                throw new QueryErrorException(json_encode($data));
            }
        }

        return;
    }
739585
public function deleteInstances( core_kernel_classes_Class $resource, $resources, $deleteReference = false)
    {
        $returnValue = false;

        $class = new core_kernel_classes_Class($resource->getUri());
        $uris = array();
        
        foreach ($resources as $r) {
            $uri = (($r instanceof core_kernel_classes_Resource) ? $r->getUri() : $r);
            $uris[] = $this->getPersistence()->quote($uri);
        }
        
        if ($class->exists()) {
            $inValues = implode(',', $uris);
            $query = 'DELETE FROM statements WHERE subject IN (' . $inValues . ')';
        	
            if (true === $deleteReference) {
                $params[] = $resource->getUri();
                $query .= ' OR object IN (' . $inValues . ')';
            }
        	
            try {
        		// Even if now rows are affected, we consider the resources
        		// as deleted.
        		$this->getPersistence()->exec($query);	
        		$returnValue = true;
            } catch (PDOException $e) {
        	    throw new core_kernel_persistence_smoothsql_Exception("An error occured while deleting resources: " . $e->getMessage());
            }
        }

        return $returnValue;
    }
538965
public function hasExclusiveLock($resource = null): bool
    {
        if (null !== $resource) {
            return $this->exclusiveLock === $this->getResourceId($resource);
        }

        return null !== $this->exclusiveLock;
    }
687159
public function delete($item){
		self::log('delete:'.$item);
		if ( $this->checkFilePath($item) &&
            ftp_delete($this->cn,$item) ){
      return true;
		}
		return false;
	}
410736
public function unsetForResource($resource)
    {
        $resourceName = $this->resourceName($resource);

        if (!isset($this->resourceFactories[$resourceName])) {
            throw new HandlerNotFoundException("No handler found for resource '$resourceName'");
        }

        unset($this->resourceFactories[$resourceName]);

        return $this;

    }
854915
public function remove($id)
    {
        try {
            return $this->resource->delete([
                'index' => $this->schema->getName(),
                'type' => static::INDEX_TYPE,
                'id' => $id
            ]);
        } catch (NoNodesAvailableException $e) {
            return false;
        }
    }
230558
protected function setupDeleteReference($resource)
    {
        foreach ($resource->settings['actions']['DeleteReference']['uris'] as $property => $uri) {
            $this->setupDelete($resource, $uri, $property);
        }
    }
947131
public function hasSharedLock($resource = null): bool
    {
        if (null !== $resource) {
            return isset($this->sharedLock[$this->getResourceId($resource)]);
        }

        return !empty($this->sharedLock);
    }
84122
public function isLocked($resource = null): bool
    {
        return $this->hasSharedLock($resource) || $this->hasExclusiveLock($resource);
    }
261590
public function delete(Resource $resource)
    {
        $data = $resource->toArray();

        $user = $this->userManager->findUserByUsername($data['username']);
        if (!$user) {
            $errorMessage = $this->translator->trans('error.user_not_found', array('%username%' => $data['username']));
            throw new NotFoundHttpException($errorMessage);
        }

        $this->userManager->deleteUser($user);
    }
1285337
public function deleteResource(core_kernel_classes_Resource $resource)
    {
        if (LockManager::getImplementation()->isLocked($resource)) {
            $userId = common_session_SessionManager::getSession()->getUser()->getIdentifier();
            LockManager::getImplementation()->releaseLock($resource, $userId);
        }

        $result = $this->deleteItemContent($resource) && parent::deleteResource($resource);

        if ($result) {
            $this->getEventManager()->trigger(new ItemRemovedEvent($resource->getUri()));
        }

        return $result;
    }