public function onRestore(RestoreEvent $event)
    {
        $plugin = $this->pluginRegistry->getPlugin($event->getOption('plugin'));

        $optionsResolver = new OptionsResolver();
        $plugin->configureOptionsResolver($optionsResolver);
        $parameter = $optionsResolver->resolve($event->getOption('parameter'));

        try {
            $plugin->restore($event->getSource(), $event->getDestination(), $event->getDatabase(), $parameter);
            $event->setStatus(BackupStatus::STATE_SUCCESS);
        } catch (\Exception $exception) {
            $event->setStatus(BackupStatus::STATE_FAILED);
            $event->setException($exception);
        }
    }
public function onRestore(RestoreEvent $event)
    {
        $plugin = $this->pluginRegistry->getPlugin($event->getOption('plugin'));

        $optionsResolver = new OptionsResolver();
        $plugin->configureOptionsResolver($optionsResolver);
        $parameter = $optionsResolver->resolve($event->getOption('parameter'));

        try {
            $plugin->restore($event->getSource(), $event->getDestination(), $event->getDatabase(), $parameter);
            $event->setStatus(BackupStatus::STATE_SUCCESS);
        } catch (\Exception $exception) {
            $event->setStatus(BackupStatus::STATE_FAILED);
            $event->setException($exception);
        }
    }
public function onRestore ( RestoreEvent $ event ) { $ plugin = $ this -> pluginRegistry -> getPlugin ( $ event -> getOption ( 'plugin' ) ) ; $ optionsResolver = new OptionsResolver ( ) ; $ plugin -> configureOptionsResolver ( $ optionsResolver ) ; $ parameter = $ optionsResolver -> resolve ( $ event -> getOption ( 'parameter' ) ) ; try { $ plugin -> restore ( $ event -> getSource ( ) , $ event -> getDestination ( ) , $ event -> getDatabase ( ) , $ parameter ) ; $ event -> setStatus ( BackupStatus :: STATE_SUCCESS ) ; } catch ( \ Exception $ exception ) { $ event -> setStatus ( BackupStatus :: STATE_FAILED ) ; $ event -> setException ( $ exception ) ; } }
Executes restore for given event.

@param RestoreEvent $event
Executes restore for given event .