You are here

public function ConsentAgreementStorage::clearRevisionsLanguage in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_consent/src/ConsentAgreementStorage.php \Drupal\gdpr_consent\ConsentAgreementStorage::clearRevisionsLanguage()
  2. 3.0.x modules/gdpr_consent/src/ConsentAgreementStorage.php \Drupal\gdpr_consent\ConsentAgreementStorage::clearRevisionsLanguage()

Unsets the language for all Consent Agreement with the given language.

Parameters

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

Overrides ConsentAgreementStorageInterface::clearRevisionsLanguage

File

modules/gdpr_consent/src/ConsentAgreementStorage.php, line 51

Class

ConsentAgreementStorage
Defines the storage handler class for Consent Agreement entities.

Namespace

Drupal\gdpr_consent

Code

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