You are here

public function EasyEmailStorage::clearRevisionsLanguage in Easy Email 2.0.x

Same name and namespace in other branches
  1. 8 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();
}