You are here

public function NodeStorage::clearRevisionsLanguage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::clearRevisionsLanguage()

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 62
Contains \Drupal\node\NodeStorage.

Class

NodeStorage
Defines the controller 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();
}