Unpublishes the given persistent resource

@param \Neos\Flow\ResourceManagement\PersistentResource $resource The resource to unpublish
@return void
346503
public function unpublishResource(PersistentResource $resource)
    {
        try {
            $objectName = $this->keyPrefix . $this->getRelativePublicationPathAndFilename($resource);
            $this->s3Client->deleteObject(array(
                'Bucket' => $this->bucketName,
                'Key' => $objectName
            ));
            $this->systemLogger->log(sprintf('Successfully unpublished resource as object "%s" (MD5: %s) from bucket "%s"', $objectName, $resource->getMd5() ?: 'unknown', $this->bucketName), LOG_DEBUG);
        } catch (\Exception $e) {
        }
    }
80568
public function clearUnPublishJob()
    {
        // Cancel any in-progress unpublish job
        $job = $this->owner->UnPublishJob();
        if ($job && $job->exists()) {
            $job->delete();
        }
        $this->owner->UnPublishJobID = 0;
    }
545767
public function unPublish(HTTPRequest $request)
    {
        $records = $this->getRecords();
        $response = new HTTPBulkToolsResponse(false, $this->gridField);
        
        try {
            foreach ($records as $record)
            {
                $done = $record->doUnpublish();
                if ($done)
                {
                    $response->addSuccessRecord($record);
                }else{
                    $response->addFailedRecord($record, $done);
                }
            }

            $doneCount = count($response->getSuccessRecords());
            $failCount = count($response->getFailedRecords());
            $message = sprintf(
                'UnPublished %1$d of %2$d records.',
                $doneCount,
                $doneCount + $failCount
            );
            $response->setMessage($message);
        } catch (Exception $ex) {
            $response->setStatusCode(500);
            $response->setMessage($ex->getMessage());
        }

        return $response;
    }
268774
public function clearPublishJob()
    {
        $job = $this->owner->PublishJob();
        if ($job && $job->exists()) {
            $job->delete();
        }
        $this->owner->PublishJobID = 0;
    }
1115499
public function unlock($resource) {
        if ($this->hasExclusiveLock($resource)) {
            $this->exclusiveLock = null;
        }
        if ($this->hasSharedLock($resource)) {
            unset($this->sharedLock[$this->getResourceId($resource)]);
        }
    }
10899
def unpublish(self, path):
        """"""
        
        data = """
<propertyupdate xmlns="DAV:">
  <remove>
    <prop>
      <public_url xmlns="urn:yandex:disk:meta" />
    </prop>
  </remove>
</propertyupdate>
        """
        
        _check_dst_absolute(path)
        resp = self._sendRequest("PROPPATCH", addUrl=path, data=data)
        if resp.status_code == 207:
            pass
        else:
            raise YaDiskException(resp.status_code, resp.content)
636075
protected function unPublish($path)
    {
        if (($file = $this->getFileObject($path))) {
            $permissions = $file->getPermissions();
            try {
                foreach ($permissions as $permission) {
                    if ($permission->type === 'anyone' && $permission->role === 'reader') {
                        $this->service->permissions->delete($file->getId(), $permission->getId());
                    }
                }
                return true;
            } catch (Exception $e) {
                return false;
            }
        }

        return false;
    }
730177
public static function close_file($resource, $area = null)
	{
		// If locks aren't used, don't unlock
		if ( static::instance($area)->use_locks())
		{
			flock($resource, LOCK_UN);
		}

		fclose($resource);
	}
1281689
protected function removeImageFromStorage (HCResources $resource)
    {
        $path = $this->uploadPath . $resource->id;

        if (Storage::has ($path)) {
            Storage::delete ($path);
        }
    }
791954
public function getPublicPersistentResourceUri(PersistentResource $resource)
    {
        if ($this->baseUri != '') {
            return $this->baseUri . $this->encodeRelativePathAndFilenameForUri($this->getRelativePublicationPathAndFilename($resource));
        } else {
            return $this->s3Client->getObjectUrl($this->bucketName, $this->keyPrefix . $this->getRelativePublicationPathAndFilename($resource));
        }
    }
46540
public function remove( Resource $resource )
    {
        $cnt = 0;
        if( false !== $key = array_search( $resource, $this->instances, true ) ) {
            unset( $this->instances[$key] );
            $cnt++;
        }
        return $cnt;
    }
930127
function unpublish()
    {
        if ( $this->attribute( 'status' ) == eZContentObjectVersion::STATUS_PUBLISHED )
        {
            $this->setAttribute( 'status', eZContentObjectVersion::STATUS_ARCHIVED );
            $parentNodeList = $this->attribute( 'parent_nodes' );
            $parentNodeIDList = array();
            foreach( $parentNodeList as $parentNode )
            {
                $parentNodeIDList[] = $parentNode->attribute( 'parent_node' );
            }
            if ( count( $parentNodeIDList ) == 0 )
            {
                eZDebug::writeWarning( $this, "unable to get parent nodes for version" );
                return;
            }
            $parentNodeIDString = implode( ',' , $parentNodeIDList );
            $contentObjectID = $this->attribute( 'contentobject_id' );
            $version = $this->attribute( 'version' );
            $db = eZDB::instance();
            $query = "update ezcontentobject_tree
                      set contentobject_is_published = '0'
                      where parent_node_id in ( $parentNodeIDString ) and
                            contentobject_id = $contentObjectID and
                            contentobject_version = $version" ;
            $db->query( $query );
        }
        else
        {
            eZDebug::writeWarning( $this, "trying to unpublish non published version" );
        }

    }
723028
protected function isPublic(string $resource, $methods = null)
    {
        if (($this->authentication ?? null) === null) {
            return true;
        }

        $resource_data = $this->resources[$resource] ?? null;
        if ($resource_data === null) {
            return false;
        }

        $public = $resource_data['public'] ?? $this->default_publicity;
        if (is_string($public)) {
            $public = [$public];
        }

        $methods = (array) ($methods ?? $this->method);

        return (is_array($public))
            ? !empty(array_intersect($public, $methods))
            : (bool) $public;
    }
627256
public function setResource(PersistentResource $resource)
    {
        $this->lastModified = new \DateTime();
        $this->resource = $resource;
        $this->refresh();
    }
919738
public function removeResource(Activity $activity, ResourceNode $resource)
    {
        if ($activity->getParameters()->getSecondaryResources()->contains($resource)) {
            $activity->getParameters()->getSecondaryResources()->removeElement($resource);
            $this->om->persist($activity);
            $this->om->flush();

            return true;
        }
    }
1021653
function onAfterUnpublish() {
        if (\Config::inst()->get('ElasticSearch', 'disabled')) {
            return;
        }
        
		$this->service->remove($this->owner, 'Live');
        $this->service->index($this->owner, 'Stage');
	}
139237
public function doUnpublish()
    {
        if (!$this->canEdit()) {
            throw new ValidationException(_t('News.PublishPermissionFailure', 'No permission to publish or unpublish news item'));
        }
        $this->Live = false;
        $this->write();
    }