Skip to content

Commit

Permalink
Merge pull request #4208 from LibreSign/backport/4207/stable29
Browse files Browse the repository at this point in the history
[stable29] chore: rename method
  • Loading branch information
vitormattos authored Dec 30, 2024
2 parents 1692322 + b919889 commit b2988e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function validate(?string $type = null, $identifier = null): DataResponse
->showSigners()
->showSettings()
->showMessages()
->formatFile()
->toArray()
);

return new DataResponse($return, $statusCode);
Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function index(): TemplateResponse {
}

$this->provideSignerSignatues();
$this->initialState->provideInitialState('file_info', $this->fileService->formatFile());
$this->initialState->provideInitialState('file_info', $this->fileService->toArray());
$this->initialState->provideInitialState('identify_methods', $this->identifyMethodService->getIdentifyMethodsSettings());
$this->initialState->provideInitialState('legal_information', $this->appConfig->getAppValue('legal_information'));

Expand Down Expand Up @@ -289,7 +289,7 @@ public function sign(string $uuid): TemplateResponse {
->setSignRequest($this->getSignRequestEntity())
->showVisibleElements()
->showSigners()
->formatFile();
->toArray();
$this->initialState->provideInitialState('status', $file['status']);
$this->initialState->provideInitialState('statusText', $file['statusText']);
$this->initialState->provideInitialState('signers', $file['signers']);
Expand Down Expand Up @@ -365,7 +365,7 @@ public function signAccountFile($uuid): TemplateResponse {
->setIdentifyMethodId($this->sessionService->getIdentifyMethodId())
->showVisibleElements()
->showSigners()
->formatFile();
->toArray();
$this->initialState->provideInitialState('fileId', $file['nodeId']);
$this->initialState->provideInitialState('status', $file['status']);
$this->initialState->provideInitialState('statusText', $file['statusText']);
Expand Down Expand Up @@ -572,7 +572,7 @@ public function validationFile(string $uuid): TemplateResponse {
$this->initialState->provideInitialState('legal_information', $this->appConfig->getAppValue('legal_information'));

$this->fileService->showSigners();
$this->initialState->provideInitialState('file_info', $this->fileService->formatFile());
$this->initialState->provideInitialState('file_info', $this->fileService->toArray());

Util::addScript(Application::APP_ID, 'libresign-validation');
if (class_exists(LoadViewer::class)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/RequestSignatureController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function request(array $file, array $users, string $name, ?string $callba
->showSigners()
->showSettings()
->showMessages()
->formatFile();
->toArray();
return new DataResponse(
[
'message' => $this->l10n->t('Success'),
Expand Down Expand Up @@ -159,7 +159,7 @@ public function updateSign(?array $users = [], ?string $uuid = null, ?array $vis
->showSigners()
->showSettings()
->showMessages()
->formatFile();
->toArray();
return new DataResponse(
[
'message' => $this->l10n->t('Success'),
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ private function getMessages(): array {
/**
* @return LibresignValidateFile
*/
public function formatFile(): array {
public function toArray(): array {
$return = $this->getFile();
if ($this->showSettings) {
$return['settings'] = $this->getSettings();
Expand Down

0 comments on commit b2988e7

Please sign in to comment.