function ImageHooks::fileMove
Implements hook_file_move().
Attributes
#[Hook('file_move')]
File
-
core/
modules/ image/ src/ Hook/ ImageHooks.php, line 147
Class
- ImageHooks
- Hook implementations for image.
Namespace
Drupal\image\HookCode
public function fileMove(FileInterface $file, FileInterface $source) : void {
$imageDerivativeUtilities = ($this->imageDerivativeUtilitiesClosure)();
// Delete any image derivatives at the original image path.
$imageDerivativeUtilities->pathFlush($source->getFileUri());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.