You are here

private function SpiController::getWatchdogSize in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::getWatchdogSize()
  2. 3.x src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::getWatchdogSize()

Get the number of rows in watchdog.

Return value

int Number of watchdog records.

1 call to SpiController::getWatchdogSize()
SpiController::get in src/Controller/SpiController.php
Gather site profile information about this site.

File

src/Controller/SpiController.php, line 470

Class

SpiController
SPI Controller class.

Namespace

Drupal\acquia_connector\Controller

Code

private function getWatchdogSize() {
  if ($this
    ->moduleHandler()
    ->moduleExists('dblog')) {
    return Database::getConnection()
      ->select('watchdog', 'w')
      ->fields('w', [
      'wid',
    ])
      ->countQuery()
      ->execute()
      ->fetchField();
  }
}