/** * {@inheritdoc} */ public function preRemove(MediaInterface $media) { $path = $this->getReferenceImage($media); if ($this->getFilesystem()->has($path)) { $this->getFilesystem()->delete($path); } if ($this->requireThumbnails()) { $this->thumbnail->delete($this, $media); } }
/** * {@inheritdoc} */ public function delete(MediaProviderInterface $provider, MediaInterface $media, $formats = null) { return $this->thumbnail->delete($provider, $media, $formats); }