You are here

public function ScheduleStorage::clearRevisionsLanguage in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/ScheduleStorage.php \Drupal\business_rules\ScheduleStorage::clearRevisionsLanguage()

Unsets the language for all Schedule with the given language.

Parameters

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

Overrides ScheduleStorageInterface::clearRevisionsLanguage

File

src/ScheduleStorage.php, line 51

Class

ScheduleStorage
Defines the storage handler class for Schedule entities.

Namespace

Drupal\business_rules

Code

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