From 2e8656576668dbedec67747898ac384c6358622f Mon Sep 17 00:00:00 2001 From: Steven Orr Date: Sat, 12 Dec 2015 22:54:35 -0800 Subject: [PATCH 1/2] Replace word 'order' with 'folder'. Author intended to instruct the creation of a new folder called 'Menu'. --- 11-page-menu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/11-page-menu.md b/11-page-menu.md index c46782b..befdc27 100644 --- a/11-page-menu.md +++ b/11-page-menu.md @@ -181,7 +181,7 @@ Everything should work now, but it doesn't really make sense that the menu is de Right now the menu is defined in the array, but it is very likely that this will change in the future. Maybe you want to define it in the database or maybe you even want to generate it dynamically based on the pages available. We don't have this information and things might change in the future. -So let's do the right thing here and start with an interface again. But first, create a new order in the `src` directory for the menu related things. `Menu` sounds like a reasonable name, doesn't it? +So let's do the right thing here and start with an interface again. But first, create a new folder in the `src` directory for the menu related things. `Menu` sounds like a reasonable name, doesn't it? ```php >](12-frontend.md) \ No newline at end of file +[<< previous](10-dynamic-pages.md) | [next >>](12-frontend.md) From 939914d973e204f0f36de5648d5e9cdc70f9e978 Mon Sep 17 00:00:00 2001 From: Steven Orr Date: Sat, 12 Dec 2015 23:37:09 -0800 Subject: [PATCH 2/2] Replace 'FileMenuReader' with correct reader. Author intended on sharing 'ArrayMenuReader' not unknown 'FileMenuReader' with injector. --- 11-page-menu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/11-page-menu.md b/11-page-menu.md index befdc27..3e793e3 100644 --- a/11-page-menu.md +++ b/11-page-menu.md @@ -220,7 +220,7 @@ Add these lines above the `return` statement: ```php $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.