You are here

public function HeartbeatStreamStorage::clearRevisionsLanguage in Heartbeat 8

Unsets the language for all Heartbeat stream with the given language.

Parameters

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

Overrides HeartbeatStreamStorageInterface::clearRevisionsLanguage

File

src/HeartbeatStreamStorage.php, line 51

Class

HeartbeatStreamStorage
Defines the storage handler class for Heartbeat stream entities.

Namespace

Drupal\heartbeat

Code

public function clearRevisionsLanguage(LanguageInterface $language) {
  return $this->database
    ->update('heartbeat_stream_revision')
    ->fields(array(
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ))
    ->condition('langcode', $language
    ->getId())
    ->execute();
}