You are here

public function LogStorage::countDefaultLanguageRevisions in Log entity 8

Counts the number of revisions in the default language.

Parameters

\Drupal\log\LogInterface: The log entity.

Return value

int The number of revisions in the default language.

Overrides LogStorageInterface::countDefaultLanguageRevisions

File

src/LogStorage.php, line 45
Contains \Drupal\log\LogStorage.

Class

LogStorage
Defines the controller class for logs.

Namespace

Drupal\log

Code

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