Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve deprecations #1724

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cocur/slugify": "^4.0",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/persistence": "^3.0.2",
"sonata-project/admin-bundle": "^4.19",
"sonata-project/admin-bundle": "^4.28",
"sonata-project/block-bundle": "^4.18 || ^5.0",
"sonata-project/doctrine-extensions": "^1.18 || ^2.1",
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
Expand Down
6 changes: 2 additions & 4 deletions src/Controller/BlockAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ public function createAction(Request $request): Response
unset($blockServices[$code]);
}

return $this->renderWithExtraParams('@SonataPage/BlockAdmin/select_type.html.twig', [
return $this->render('@SonataPage/BlockAdmin/select_type.html.twig', [
'blockServices' => $blockServices,
'base_template' => $this->getBaseTemplate(),
'admin' => $this->admin,
'action' => 'create',
]);
}
Expand Down Expand Up @@ -171,7 +169,7 @@ public function composePreviewAction(Request $request): Response
\assert($blockManager instanceof BlockServiceManagerInterface);
$blockService = $blockManager->get($existingObject);

return $this->renderWithExtraParams('@SonataPage/BlockAdmin/compose_preview.html.twig', [
return $this->render('@SonataPage/BlockAdmin/compose_preview.html.twig', [
'container' => $container,
'child' => $existingObject,
'blockService' => $blockService,
Expand Down
8 changes: 4 additions & 4 deletions src/Controller/PageAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function treeAction(Request $request): Response
$theme = $this->admin->getFilterTheme();
$this->setFormTheme($formView, $theme);

return $this->renderWithExtraParams($this->admin->getTemplateRegistry()->getTemplate('tree'), [
return $this->render($this->admin->getTemplateRegistry()->getTemplate('tree'), [
'action' => 'tree',
'sites' => $sites,
'currentSite' => $currentSite,
Expand Down Expand Up @@ -153,7 +153,7 @@ public function createAction(Request $request): Response
$current = false;
}

return $this->renderWithExtraParams($this->admin->getTemplateRegistry()->getTemplate('select_site'), [
return $this->render($this->admin->getTemplateRegistry()->getTemplate('select_site'), [
'sites' => $sites,
'current' => $current,
]);
Expand Down Expand Up @@ -237,7 +237,7 @@ public function composeAction(Request $request): Response
}
}

return $this->renderWithExtraParams($this->admin->getTemplateRegistry()->getTemplate('compose'), [
return $this->render($this->admin->getTemplateRegistry()->getTemplate('compose'), [
'object' => $page,
'action' => 'edit',
'template' => $template,
Expand Down Expand Up @@ -314,7 +314,7 @@ public function composeContainerShowAction(Request $request): Response
}
}

return $this->renderWithExtraParams($this->admin->getTemplateRegistry()->getTemplate('compose_container_show'), [
return $this->render($this->admin->getTemplateRegistry()->getTemplate('compose_container_show'), [
'blockServices' => $blockServices,
'blockAdmin' => $blockAdmin,
'container' => $block,
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/SiteAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function snapshotsAction(Request $request): Response
return new RedirectResponse($this->admin->generateUrl('edit', ['id' => $object->getId()]));
}

return $this->renderWithExtraParams('@SonataPage/SiteAdmin/create_snapshots.html.twig', [
return $this->render('@SonataPage/SiteAdmin/create_snapshots.html.twig', [
'action' => 'snapshots',
'object' => $object,
]);
Expand Down
Loading