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

restoreGlobalAliases() protected method

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