| @@ 897-913 (lines=17) @@ | ||
| 894 | * |
|
| 895 | * The number excludes absolute root Location, which does not have an URL alias. |
|
| 896 | */ |
|
| 897 | protected function getTotalLocationCount() |
|
| 898 | { |
|
| 899 | $platform = $this->connection->getDatabasePlatform(); |
|
| 900 | ||
| 901 | $queryBuilder = $this->connection->createQueryBuilder(); |
|
| 902 | $queryBuilder |
|
| 903 | ->select($platform->getCountExpression('node_id')) |
|
| 904 | ->from('ezcontentobject_tree') |
|
| 905 | ->where( |
|
| 906 | $queryBuilder->expr()->neq( |
|
| 907 | 'node_id', |
|
| 908 | UrlAliasHandler::ROOT_LOCATION_ID |
|
| 909 | ) |
|
| 910 | ); |
|
| 911 | ||
| 912 | return $queryBuilder->execute()->fetchColumn(); |
|
| 913 | } |
|
| 914 | ||
| 915 | /** |
|
| 916 | * Returns total number of Content objects having a Location in the database. |
|
| @@ 920-936 (lines=17) @@ | ||
| 917 | * |
|
| 918 | * The number excludes absolute root Location, which does not have an URL alias. |
|
| 919 | */ |
|
| 920 | protected function getTotalLocationContentCount() |
|
| 921 | { |
|
| 922 | $platform = $this->connection->getDatabasePlatform(); |
|
| 923 | ||
| 924 | $queryBuilder = $this->connection->createQueryBuilder(); |
|
| 925 | $queryBuilder |
|
| 926 | ->select($platform->getCountExpression('DISTINCT contentobject_id')) |
|
| 927 | ->from('ezcontentobject_tree') |
|
| 928 | ->where( |
|
| 929 | $queryBuilder->expr()->neq( |
|
| 930 | 'node_id', |
|
| 931 | UrlAliasHandler::ROOT_LOCATION_ID |
|
| 932 | ) |
|
| 933 | ); |
|
| 934 | ||
| 935 | return $queryBuilder->execute()->fetchColumn(); |
|
| 936 | } |
|
| 937 | ||
| 938 | /** |
|
| 939 | * Return the number of rows in the given $table (on ID column). |
|