コード例 #1
0
 /**
  * {@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);
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function delete(MediaProviderInterface $provider, MediaInterface $media, $formats = null)
 {
     return $this->thumbnail->delete($provider, $media, $formats);
 }