NodeStorage::clearRevisionsLanguage

public NodeStorage::clearRevisionsLanguage(LanguageInterface $language)

Unsets the language for all nodes with the given language.

Parameters

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

Overrides NodeStorageInterface::clearRevisionsLanguage

File

core/modules/node/src/NodeStorage.php, line 57

Class

NodeStorage
Defines the storage handler class for nodes.

Namespace

Drupal\node

Code

public function clearRevisionsLanguage(LanguageInterface $language) {
  return $this->database->update('node_revision')
    ->fields(array('langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED))
    ->condition('langcode', $language->getId())
    ->execute();
}
doc_Drupal
2016-10-29 09:31:18
Comments
Leave a Comment

Please login to continue.