From 4ad2a20944bce3d9368a2cabf3760fd5f0f4d50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Thu, 7 May 2020 08:23:38 +0200 Subject: [PATCH] Adds more links to description of MVC integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- .../usage-in-a-laminas-mvc-application.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/book/application-integration/usage-in-a-laminas-mvc-application.md b/docs/book/application-integration/usage-in-a-laminas-mvc-application.md index 8b34b4f4d..62a53c34c 100644 --- a/docs/book/application-integration/usage-in-a-laminas-mvc-application.md +++ b/docs/book/application-integration/usage-in-a-laminas-mvc-application.md @@ -69,7 +69,8 @@ class AlbumForm extends Form implements InputFilterProviderInterface ### Create Controller -Using the form in a controller, e.g. +[Create a controller class](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-controller) +and inject the form via the constructor, e.g. `module/Album/Controller/AlbumController.php`: ```php @@ -159,8 +160,8 @@ class AlbumControllerFactory If no separate factory is required for the form, then the form element manager will instantiating the form class. Otherwise the form must be registered. -To register the controller for the application, extend the configuration of the -module. +To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) +for the application, extend the configuration of the module. Add the following lines to the module configuration file, e.g. `module/Album/config/module.config.php`: @@ -195,4 +196,7 @@ $this->headTitle('Add new album');

Add new album

form($form) ?> -``` \ No newline at end of file +``` + +The [`Form` view helper](../helper/form.md) is used to render all HTML for the +form.