Skip to content

Commit

Permalink
Merge branch 'docs/66'
Browse files Browse the repository at this point in the history
Close #66
  • Loading branch information
michalbundyra committed May 7, 2020
2 parents 19ff494 + 32f0222 commit 7afff0a
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`:

Expand Down Expand Up @@ -195,4 +196,7 @@ $this->headTitle('Add new album');
<h1>Add new album</h1>

<?= $this->form($form) ?>
```
```

The [`Form` view helper](../helper/form.md) is used to render all HTML for the
form.

0 comments on commit 7afff0a

Please sign in to comment.