You are here

public function RouteProvider::getRoutesCount in Drupal 8

Same name in this branch
  1. 8 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::getRoutesCount()
  2. 8 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::getRoutesCount()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::getRoutesCount()

File

core/lib/Drupal/Core/Routing/RouteProvider.php, line 448

Class

RouteProvider
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

public function getRoutesCount() {
  return $this->connection
    ->query("SELECT COUNT(*) FROM {" . $this->connection
    ->escapeTable($this->tableName) . "}")
    ->fetchField();
}