|
@@ 665-675 (lines=11) @@
|
| 662 |
|
* |
| 663 |
|
* The number excludes absolute root Location, which does not have an URL alias. |
| 664 |
|
*/ |
| 665 |
|
protected function getTotalCustomUrlAliasBackupCount() |
| 666 |
|
{ |
| 667 |
|
$platform = $this->connection->getDatabasePlatform(); |
| 668 |
|
|
| 669 |
|
$queryBuilder = $this->connection->createQueryBuilder(); |
| 670 |
|
$queryBuilder |
| 671 |
|
->select($platform->getCountExpression('id')) |
| 672 |
|
->from(static::CUSTOM_ALIAS_BACKUP_TABLE); |
| 673 |
|
|
| 674 |
|
return $queryBuilder->execute()->fetchColumn(); |
| 675 |
|
} |
| 676 |
|
|
| 677 |
|
/** |
| 678 |
|
* Creates database table for custom URL alias backup. |
|
@@ 720-730 (lines=11) @@
|
| 717 |
|
* |
| 718 |
|
* @return bool |
| 719 |
|
*/ |
| 720 |
|
protected function isTableEmpty($name) |
| 721 |
|
{ |
| 722 |
|
$queryBuilder = $this->connection->createQueryBuilder(); |
| 723 |
|
$queryBuilder |
| 724 |
|
->select($this->connection->getDatabasePlatform()->getCountExpression('*')) |
| 725 |
|
->from($name); |
| 726 |
|
|
| 727 |
|
$count = $queryBuilder->execute()->fetchColumn(); |
| 728 |
|
|
| 729 |
|
return $count == 0; |
| 730 |
|
} |
| 731 |
|
|
| 732 |
|
/** |
| 733 |
|
* Returns configured progress bar helper. |