class ImageVariantGarbageCollector (View source)

Takes care of cleaning up ImageVariants.

Properties

protected NodeDataRepository $nodeDataRepository
protected AssetRepository $assetRepository
protected PersistenceManagerInterface $persistenceManager

Methods

void
removeUnusedImageVariant(NodeInterface $node, string $propertyName, mixed $oldValue, mixed $value)

Removes unused ImageVariants after a Node property changes to a different ImageVariant.

Details

void removeUnusedImageVariant(NodeInterface $node, string $propertyName, mixed $oldValue, mixed $value)

Removes unused ImageVariants after a Node property changes to a different ImageVariant.

This is triggered via the nodePropertyChanged event.

Note: This method it triggered by the "nodePropertyChanged" signal, \Neos\ContentRepository\Domain\Model\Node::emitNodePropertyChanged()

Parameters

NodeInterface $node

the affected node

string $propertyName

name of the property that has been changed/added

mixed $oldValue

the property value before it was changed or NULL if the property is new

mixed $value

the new property value

Return Value

void