You are here

public function PhotosImageStorage::clearRevisionsLanguage in Album Photos 6.0.x

Same name and namespace in other branches
  1. 8.5 src/PhotosImageStorage.php \Drupal\photos\PhotosImageStorage::clearRevisionsLanguage()

Unsets the language for all images with the given language.

Parameters

\Drupal\Core\Language\LanguageInterface $language: The language object.

Overrides PhotosImageStorageInterface::clearRevisionsLanguage

File

src/PhotosImageStorage.php, line 59

Class

PhotosImageStorage
Defines the storage handler class for photos images.

Namespace

Drupal\photos

Code

public function clearRevisionsLanguage(LanguageInterface $language) {
  return $this->database
    ->update($this
    ->getRevisionTable())
    ->fields([
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ])
    ->condition('langcode', $language
    ->getId())
    ->execute();
}