src/Extensions/ArchiveRestoreAction.php
public function doRestore($data, $form)
    {
        $record = $this->owner->getRecord();

        $message = RestoreAction::restore($record);

        $controller = $this->owner->popupController;
        $controller->getRequest()->addHeader('X-Pjax', 'Content');
        $controller->getEditForm()->sessionMessage($message['text'], $message['type'], ValidationResult::CAST_HTML);

        return $controller->redirect($controller->Link(), 'index');
    }
public function doRestore($data, $form)
    {
        $record = $this->owner->getRecord();

        $message = RestoreAction::restore($record);

        $controller = $this->owner->popupController;
        $controller->getRequest()->addHeader('X-Pjax', 'Content');
        $controller->getEditForm()->sessionMessage($message['text'], $message['type'], ValidationResult::CAST_HTML);

        return $controller->redirect($controller->Link(), 'index');
    }
public function doRestore ( $ data , $ form ) { $ record = $ this -> owner -> getRecord ( ) ; $ message = RestoreAction :: restore ( $ record ) ; $ controller = $ this -> owner -> popupController ; $ controller -> getRequest ( ) -> addHeader ( 'X-Pjax' , 'Content' ) ; $ controller -> getEditForm ( ) -> sessionMessage ( $ message [ 'text' ] , $ message [ 'type' ] , ValidationResult :: CAST_HTML ) ; return $ controller -> redirect ( $ controller -> Link ( ) , 'index' ) ; }
Restore the record to its original place or top level if that's not possible

@param array $data
@param Form $form
@return HTTPResponse
Restore the record to its original place or top level if that s not possible