eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::restoreCustomLocationAliases PHP Method

restoreCustomLocationAliases() protected method

Restores custom Location URL aliases from the backup table.
    protected function restoreCustomLocationAliases()
    {
        $mainTable = static::MIGRATION_TABLE;
        $backupTable = static::CUSTOM_ALIAS_BACKUP_TABLE;
        if (!$this->tableExists($mainTable)) {
            throw new RuntimeException("Could not find main URL alias migration table '{$mainTable}'. " . 'Ensure that table exists (you will have to create it manually).');
        }
        if (!$this->tableExists($backupTable)) {
            throw new RuntimeException("Could not find custom Location URL alias backup table '{$backupTable}'. " . "Ensure that table is created by 'backup-custom' action.");
        }
        $this->doRestoreCustomLocationAliases();
    }