Skip to content

Commit

Permalink
Merge 4.x into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Nov 22, 2023
2 parents b65450b + c0b2c44 commit 0a93b5d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.6.1](https://github.com/sonata-project/SonataPageBundle/compare/4.6.0...4.6.1) - 2023-11-21
### Fixed
- [[#1724](https://github.com/sonata-project/SonataPageBundle/pull/1724)] Usage of deprecated method `renderWithParams` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#1721](https://github.com/sonata-project/SonataPageBundle/pull/1721)] Removal of a page ([@GeraudBourdin](https://github.com/GeraudBourdin))

## [4.6.0](https://github.com/sonata-project/SonataPageBundle/compare/4.5.0...4.6.0) - 2023-09-07
### Changed
- [[#1522](https://github.com/sonata-project/SonataPageBundle/pull/1522)] Uses Symfony Serializer to transform Page and Block Models into array for json ([@Hanmac](https://github.com/Hanmac))
Expand Down
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

0 comments on commit 0a93b5d

Please sign in to comment.