PHP Class Neos\Neos\Service\ImageVariantGarbageCollector

Show file Open project: neos/neos-development-collection

Protected Properties

Property Type Description
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface

Public Methods

Method Description
removeUnusedImageVariant ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName, mixed $oldValue, mixed $value ) : void Removes unused ImageVariants after a Node property changes to a different ImageVariant.

Method Details

removeUnusedImageVariant() public method

This is triggered via the nodePropertyChanged event. Note: This method it triggered by the "nodePropertyChanged" signal, @see \Neos\ContentRepository\Domain\Model\Node::emitNodePropertyChanged()
public removeUnusedImageVariant ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName, mixed $oldValue, mixed $value ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface the affected node
$propertyName string name of the property that has been changed/added
$oldValue mixed the property value before it was changed or NULL if the property is new
$value mixed the new property value
return void

Property Details

$assetRepository protected property

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
return Neos\Media\Domain\Repository\AssetRepository

$nodeDataRepository protected property

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
return Neos\ContentRepository\Domain\Repository\NodeDataRepository

$persistenceManager protected property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface