You are here

public function SupportTicketStorage::countDefaultLanguageRevisions in Support Ticketing System 8

Counts the number of revisions in the default language.

Parameters

\Drupal\support_ticket\SupportTicketInterface: The support ticket entity.

Return value

int The number of revisions in the default language.

Overrides SupportTicketStorageInterface::countDefaultLanguageRevisions

File

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

Class

SupportTicketStorage
Defines the controller class for support tickets.

Namespace

Drupal\support_ticket

Code

public function countDefaultLanguageRevisions(SupportTicketInterface $support_ticket) {
  return $this->database
    ->query('SELECT COUNT(*) FROM {support_ticket_field_revision} WHERE stid = :stid AND default_langcode = 1', array(
    ':stid' => $support_ticket
      ->id(),
  ))
    ->fetchField();
}