function NodeStorage::clearRevisionsLanguage

Same name in other branches
  1. 9 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::clearRevisionsLanguage()
  2. 10 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::clearRevisionsLanguage()
  3. 11.x core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::clearRevisionsLanguage()

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($this->getRevisionTable())
        ->fields([
        'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
    ])
        ->condition('langcode', $language->getId())
        ->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.