public function SitewideAlertStorage::clearRevisionsLanguage in Sitewide Alert 8
Unsets the language for all Sitewide Alert with the given language.
Parameters
\Drupal\Core\Language\LanguageInterface $language: The language object.
Overrides SitewideAlertStorageInterface::clearRevisionsLanguage
File
- src/
SitewideAlertStorage.php, line 51
Class
- SitewideAlertStorage
- Defines the storage handler class for Sitewide Alert entities.
Namespace
Drupal\sitewide_alertCode
public function clearRevisionsLanguage(LanguageInterface $language) {
return $this->database
->update('sitewide_alert_revision')
->fields([
'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
])
->condition('langcode', $language
->getId())
->execute();
}