You are here

public function SupportTicketStorage::clearRevisionsLanguage in Support Ticketing System 8

Unsets the language for all support tickets with the given language.

Parameters

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

Overrides SupportTicketStorageInterface::clearRevisionsLanguage

File

modules/support_ticket/src/SupportTicketStorage.php, line 62
Contains \Drupal\support_ticket\SupportTicketStorage.

Class

SupportTicketStorage
Defines the controller class for support tickets.

Namespace

Drupal\support_ticket

Code

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