From b2b3443715095a32bad1c4bd6a9af0037f96e3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Sat, 10 Apr 2021 08:04:28 +0200 Subject: [PATCH] Fixes Markdown problems in documentation files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/cookbook/mvc-sitemap.md | 6 ++++-- docs/book/helpers/intro.md | 4 ++-- docs/book/helpers/links.md | 2 ++ docs/book/helpers/menu.md | 1 - docs/book/helpers/sitemap.md | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/book/cookbook/mvc-sitemap.md b/docs/book/cookbook/mvc-sitemap.md index 3a65889c..6e36b370 100644 --- a/docs/book/cookbook/mvc-sitemap.md +++ b/docs/book/cookbook/mvc-sitemap.md @@ -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`: +

 namespace Application;
 
@@ -137,6 +138,7 @@ return [
     // …
 ];
 
+ ## Render Sitemap @@ -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 diff --git a/docs/book/helpers/intro.md b/docs/book/helpers/intro.md index abb6a14b..2263f83f 100644 --- a/docs/book/helpers/intro.md +++ b/docs/book/helpers/intro.md @@ -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. @@ -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. diff --git a/docs/book/helpers/links.md b/docs/book/helpers/links.md index 71f70210..0e9fe96d 100644 --- a/docs/book/helpers/links.md +++ b/docs/book/helpers/links.md @@ -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 diff --git a/docs/book/helpers/menu.md b/docs/book/helpers/menu.md index 590c77bd..ff16fb37 100644 --- a/docs/book/helpers/menu.md +++ b/docs/book/helpers/menu.md @@ -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 diff --git a/docs/book/helpers/sitemap.md b/docs/book/helpers/sitemap.md index 8ff4e441..4546b5c8 100644 --- a/docs/book/helpers/sitemap.md +++ b/docs/book/helpers/sitemap.md @@ -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 ---------- | ------ | -----------