public function OpignoAnswerStorage::clearRevisionsLanguage in Opigno module 8
Same name and namespace in other branches
- 3.x src/OpignoAnswerStorage.php \Drupal\opigno_module\OpignoAnswerStorage::clearRevisionsLanguage()
Unsets the language for all Answer with the given language.
Parameters
\Drupal\Core\Language\LanguageInterface $language: The language object.
Overrides OpignoAnswerStorageInterface::clearRevisionsLanguage
File
- src/
OpignoAnswerStorage.php, line 51
Class
- OpignoAnswerStorage
- Defines the storage handler class for Answer entities.
Namespace
Drupal\opigno_moduleCode
public function clearRevisionsLanguage(LanguageInterface $language) {
return $this->database
->update('opigno_answer_revision')
->fields([
'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
])
->condition('langcode', $language
->getId())
->execute();
}