Skip to content

Commit 5a82165

Browse files
authored
Merge pull request #47 from synolia/fix/missing-twig-hooks-entrypoint
[2.x] fix(layout): missing twig hooks config
2 parents cad211d + 5bfc84a commit 5a82165

File tree

6 files changed

+14
-58
lines changed

6 files changed

+14
-58
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ From the plugin root directory, run the following commands:
66
$ make install -e SYLIUS_VERSION=XX SYMFONY_VERSION=YY PHP_VERSION=ZZ
77
```
88

9-
Default values : XX=1.12.0 and YY=6.1 and ZZ=8.1
9+
Default values : XX=2.0 and YY=7.1 and ZZ=8.2
1010

1111
To be able to setup this plugin database, remember to configure you database credentials
1212
in `install/Application/.env.local` and `install/Application/.env.test.local`.

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@
5252
prefix: '/%sylius_admin.path_name%'
5353
```
5454

55-
3. Clear cache
55+
3. Import twig hooks from config in your `config/packages/maintenance.yaml` file:
56+
57+
``` yaml
58+
imports:
59+
- { resource: "@SynoliaSyliusMaintenancePlugin/config/config.yaml" }
60+
```
61+
62+
4. Clear cache
5663
5764
``` shell
5865
php bin/console cache:clear

config/config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports:
2+
- { resource: "@SynoliaSyliusMaintenancePlugin/config/twig_hooks/**/*.yaml" }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports:
2+
- { resource: "@SynoliaSyliusMaintenancePlugin/config/config.yaml" }

src/Controller/MaintenanceConfigurationController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __invoke(Request $request): Response
5555
$flashBag->add('success', $this->translator->trans($message));
5656
}
5757

58-
return $this->render('@SynoliaSyliusMaintenancePlugin/Admin/maintenanceConfiguration.html.twig', [
58+
return $this->render('@SynoliaSyliusMaintenancePlugin/admin/maintenance/layout.html.twig', [
5959
'maintenanceConfiguration' => $maintenanceConfiguration,
6060
'form' => $form->createView(),
6161
]);

templates/Admin/maintenanceConfiguration.html.twig

-55
This file was deleted.

0 commit comments

Comments
 (0)