| @@ 619-635 (lines=17) @@ | ||
| 616 | * |
|
| 617 | * The number excludes absolute root Location, which does not have an URL alias. |
|
| 618 | */ |
|
| 619 | protected function getTotalLocationCount() |
|
| 620 | { |
|
| 621 | $platform = $this->connection->getDatabasePlatform(); |
|
| 622 | ||
| 623 | $queryBuilder = $this->connection->createQueryBuilder(); |
|
| 624 | $queryBuilder |
|
| 625 | ->select($platform->getCountExpression('node_id')) |
|
| 626 | ->from('ezcontentobject_tree') |
|
| 627 | ->where( |
|
| 628 | $queryBuilder->expr()->neq( |
|
| 629 | 'node_id', |
|
| 630 | UrlAliasHandler::ROOT_LOCATION_ID |
|
| 631 | ) |
|
| 632 | ); |
|
| 633 | ||
| 634 | return $queryBuilder->execute()->fetchColumn(); |
|
| 635 | } |
|
| 636 | ||
| 637 | /** |
|
| 638 | * Returns total number of Content objects having a Location in the database. |
|
| @@ 642-658 (lines=17) @@ | ||
| 639 | * |
|
| 640 | * The number excludes absolute root Location, which does not have an URL alias. |
|
| 641 | */ |
|
| 642 | protected function getTotalLocationContentCount() |
|
| 643 | { |
|
| 644 | $platform = $this->connection->getDatabasePlatform(); |
|
| 645 | ||
| 646 | $queryBuilder = $this->connection->createQueryBuilder(); |
|
| 647 | $queryBuilder |
|
| 648 | ->select($platform->getCountExpression('DISTINCT contentobject_id')) |
|
| 649 | ->from('ezcontentobject_tree') |
|
| 650 | ->where( |
|
| 651 | $queryBuilder->expr()->neq( |
|
| 652 | 'node_id', |
|
| 653 | UrlAliasHandler::ROOT_LOCATION_ID |
|
| 654 | ) |
|
| 655 | ); |
|
| 656 | ||
| 657 | return $queryBuilder->execute()->fetchColumn(); |
|
| 658 | } |
|
| 659 | ||
| 660 | /** |
|
| 661 | * Returns total number of Content objects having a Location in the database. |
|