/** * Delete an image * * @param string $imageName * @return boolean */ protected function deleteSlideShowImage($imageName) { if (true !== ($result = FileSystemUtility::deleteResourceFile($imageName, self::$imagesDir))) { return $result; } return true; }
/** * Delete an user's avatar * * @param string $avatarName * @return boolean */ protected function deleteUserAvatar($avatarName) { $avatarTypes = [self::$thumbnailsDir, self::$avatarsDir]; // delete avatar foreach ($avatarTypes as $path) { if (true !== ($result = FileSystemUtility::deleteResourceFile($avatarName, $path))) { return $result; } } return true; }
/** * Delete an image * * @param string $imageName * @return boolean */ protected function deleteMiniPhotoGalleryImage($imageName) { $imageTypes = [self::$thumbnailsDir, self::$imagesDir]; // delete images foreach ($imageTypes as $path) { if (true !== ($result = FileSystemUtility::deleteResourceFile($imageName, $path))) { return $result; } } return true; }
/** * Delete an membership's image * * @param string $imageName * @return boolean */ protected function deleteImage($imageName) { return FileSystemUtility::deleteResourceFile($imageName, self::$imagesDir); }