Replace 'FileMenuReader' with correct reader.
Author intended on sharing 'ArrayMenuReader' not unknown 'FileMenuReader' with injector.
This commit is contained in:
parent
ed960ddb7d
commit
939914d973
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ Add these lines above the `return` statement:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$injector->alias('Example\Menu\MenuReader', 'Example\Menu\ArrayMenuReader');
|
$injector->alias('Example\Menu\MenuReader', 'Example\Menu\ArrayMenuReader');
|
||||||
$injector->share('Example\Menu\FileMenuReader');
|
$injector->share('Example\Menu\ArrayMenuReader');
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you need to change out the hardcoded array in the `FrontendTwigRenderer` class to make it use our new `MenuReader` instead. Give it a try without looking at the solution below.
|
Now you need to change out the hardcoded array in the `FrontendTwigRenderer` class to make it use our new `MenuReader` instead. Give it a try without looking at the solution below.
|
||||||
|
|
Loading…
Reference in a new issue