You are here

public function EasyEmailStorage::clearRevisionsLanguage in Easy Email 8

Same name and namespace in other branches
  1. 2.0.x src/EasyEmailStorage.php \Drupal\easy_email\EasyEmailStorage::clearRevisionsLanguage()

Unsets the language for all Email with the given language.

Parameters

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

Overrides EasyEmailStorageInterface::clearRevisionsLanguage

File

src/EasyEmailStorage.php, line 122

Class

EasyEmailStorage
Defines the storage handler class for Email entities.

Namespace

Drupal\easy_email

Code

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