Common\Doctrine\ValueObject\AbstractImage::removeOldFile PHP Method

removeOldFile() protected method

This will remove the old image and if needed the generated thumbnails
protected removeOldFile ( )
    protected function removeOldFile()
    {
        if (static::GENERATE_THUMBNAILS && is_dir($this->getUploadRootDir())) {
            Model::deleteThumbnails($this->getUploadRootDir(), $this->oldFileName);
            return;
        }
        parent::removeOldFile();
    }