Skip to content

Commit

Permalink
Merge pull request #16 from froschdesign/hotfix/docs/markdown-cleanup
Browse files Browse the repository at this point in the history
Fixes Markdown problems in documentation files
  • Loading branch information
froschdesign authored Apr 10, 2021
2 parents 2617de2 + b2b3443 commit d09bdec
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions docs/book/cookbook/mvc-sitemap.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class SitemapMiddlewareFactory
To [register the middleware](https://docs.laminas.dev/laminas-mvc-middleware/intro/#mapping-routes-to-middleware) for the application and to [create the route](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route), extend the configuration of the module.
Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`:

<!-- markdownlint-disable MD033 -->
<pre class="language-php" data-line="8-9,14-23"><code>
namespace Application;

Expand Down Expand Up @@ -137,6 +138,7 @@ return [
// …
];
</code></pre>
<!-- markdownlint-restore -->

## Render Sitemap

Expand Down Expand Up @@ -174,8 +176,8 @@ Output:
This all works with a [_classic_ controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-controller) as well.
The Sitemap helper already creates all the XML content, so the rendering of the view layer can be also omitted here:

* Get the response object of the controller
* Set the HTTP header for XML content
* Get the response object of the controller
* Set the HTTP header for XML content
* Set the rendered sitemap as content
* Return the response object for controller action

Expand Down
4 changes: 2 additions & 2 deletions docs/book/helpers/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Method signature | Descrip
`hasContainer() : bool` | Is any navigation container currently registered?
`setContainer(AbstractContainer $container) : self` | Set a navigation container.
`getTranslator() : null\|Laminas\I18n\Translator\TranslatorInterface` | Retrieve the current translator instance, if any.
`setTranslator(Laminas\I18n\Translator\TranslatorInterface`) : self` | Set a translator instance to use with labels.
`setTranslator(Laminas\I18n\Translator\TranslatorInterface) : self` | Set a translator instance to use with labels.
`hasTranslator() : bool` | Is a translator instance present?
`isTranslatorEnabled() : bool` | Should translation occur? To be `true`, both the flag enabling translation must be set, and a translator instance present.
`setTranslatorEnabled(bool $flag) : self` | Set the flag indicating whether or not translation should occur.
Expand Down Expand Up @@ -66,7 +66,7 @@ Method signature | D
If a container is not explicitly set, the helper will create an empty
`Laminas\Navigation\Navigation` container when calling `$helper->getContainer()`.

### Proxying calls to the navigation container
## Proxying calls to the navigation container

Navigation view helpers use the magic method `__call()` to proxy method calls to
the navigation container that is registered in the view helper.
Expand Down
2 changes: 2 additions & 0 deletions docs/book/helpers/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ be either `rel` or `rev`. Most methods also take a `$type` param, which is used
for specifying the link type (e.g. `alternate`, `start`, `next`, `prev`,
`chapter`, etc).

## Managing Relationships within the Helper

Relationships can be added to page objects manually, or found by traversing the
container registered in the helper. The method `findRelation($page, $rel,
$type)` will first try to find the given `$rel` of `$type` from the `$page` by
Expand Down
1 change: 0 additions & 1 deletion docs/book/helpers/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Option name | Description
`onlyActiveBranch` | Whether only active branch should be rendered. Expects a `boolean` value.
`renderParents` | Whether parents should be rendered if only rendering active branch. Expects a `boolean` value.


## Basic usage

This example shows how to render a menu from a container registered/found in the
Expand Down
2 changes: 1 addition & 1 deletion docs/book/helpers/sitemap.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ By default, the sitemap helper uses [sitemap validators](https://github.com/lami
to validate each element that is rendered. This can be disabled by calling
`$helper->setUseSitemapValidators(false)`.

### Sitemap XML elements
## Sitemap XML elements

Element | Type | Description
---------- | ------ | -----------
Expand Down

0 comments on commit d09bdec

Please sign in to comment.