public function restoreCommand($selectedBackup = null)
    {
        $this->initialize();

        if (is_null($selectedBackup)) {
            $availableVersions = $this->backupService->getAvailableVersions();

            if ( count($availableVersions)<=0 ) {
                $this->output->outputLine();
                $this->output->outputLine('<b>You have no Backups!</b>');
                $this->output->outputLine();
                $this->output->outputLine('Call \'./flow backup:now\' and create one.');
                $this->output->outputLine();
                return;
            }

            $selectedBackup = $this->askWithSelectForVersion($availableVersions);
        }

        $this->backupService->restoreBackup($selectedBackup);
    }
public function restoreCommand($selectedBackup = null)
    {
        $this->initialize();

        if (is_null($selectedBackup)) {
            $availableVersions = $this->backupService->getAvailableVersions();

            if ( count($availableVersions)<=0 ) {
                $this->output->outputLine();
                $this->output->outputLine('<b>You have no Backups!</b>');
                $this->output->outputLine();
                $this->output->outputLine('Call \'./flow backup:now\' and create one.');
                $this->output->outputLine();
                return;
            }

            $selectedBackup = $this->askWithSelectForVersion($availableVersions);
        }

        $this->backupService->restoreBackup($selectedBackup);
    }
public function restoreCommand ( $ selectedBackup = null ) { $ this -> initialize ( ) ; if ( is_null ( $ selectedBackup ) ) { $ availableVersions = $ this -> backupService -> getAvailableVersions ( ) ; if ( count ( $ availableVersions ) <= 0 ) { $ this -> output -> outputLine ( ) ; $ this -> output -> outputLine ( '<b>You have no Backups!</b>' ) ; $ this -> output -> outputLine ( ) ; $ this -> output -> outputLine ( 'Call \'./flow backup:now\' and create one.' ) ; $ this -> output -> outputLine ( ) ; return ; } $ selectedBackup = $ this -> askWithSelectForVersion ( $ availableVersions ) ; } $ this -> backupService -> restoreBackup ( $ selectedBackup ) ; }
Select & restore a Backup

@param string $selectedBackup
@return void
Select & restore a Backup