Skip to content

Commit

Permalink
Merge pull request #62 from froschdesign/hotfix/docs/markdown-tables
Browse files Browse the repository at this point in the history
Fix markdown formatting issues in documentation files
  • Loading branch information
gsteel authored Oct 16, 2024
2 parents 2f39ab2 + bd4c0fe commit 17e75f4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 35 deletions.
40 changes: 20 additions & 20 deletions docs/book/helpers/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ adds integration with
implements the interface `Laminas\View\Helper\Navigation\HelperInterface`, which
defines the following methods:

Method signature | Description
---------------------------------------------------------------------- | -----------
`getContainer() : null\|AbstractContainer` | Retrieve the current navigation container, if any.
`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.
`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.
`getAcl() : null\|Laminas\Permissions\Acl\AclInterface` | Retrieve the current ACL instance, if any.
`setAcl(Laminas\Permissions\Acl\AclInterface $acl) : self` | Set an ACL instance.
`hasAcl() : bool` | Whether or not an ACL instance is present.
`getRole() : null\|string|\Laminas\Permissions\Acl\Role\RoleInterface` | Retrieve the current ACL role instance, if any.
`setRole(string\|Laminas\Permissions\Acl\Role\RoleInterface $acl) : self` | Set an ACL role instance.
`hasRole() : bool` | Whether or not an ACL role instance is present.
`getUseAcl() : bool` | Whether or not to use ACLs; both the flag must be enabled and an ACL instance present.
`setUseAcl(bool $flag) : self` | Set the flag indicating whether or not to use ACLs.
`__toString()` | Cast the helper to a string value; relies on `render()`.
`render()` | Render the helper to a string.
Method signature | Description
---------------------------------------------------------------------------| -----------
`getContainer() : null\|AbstractContainer` | Retrieve the current navigation container, if any.
`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.
`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.
`getAcl() : null\|Laminas\Permissions\Acl\AclInterface` | Retrieve the current ACL instance, if any.
`setAcl(Laminas\Permissions\Acl\AclInterface $acl) : self` | Set an ACL instance.
`hasAcl() : bool` | Whether or not an ACL instance is present.
`getRole() : null\|string\|\Laminas\Permissions\Acl\Role\RoleInterface` | Retrieve the current ACL role instance, if any.
`setRole(string\|Laminas\Permissions\Acl\Role\RoleInterface $acl) : self` | Set an ACL role instance.
`hasRole() : bool` | Whether or not an ACL role instance is present.
`getUseAcl() : bool` | Whether or not to use ACLs; both the flag must be enabled and an ACL instance present.
`setUseAcl(bool $flag) : self` | Set the flag indicating whether or not to use ACLs.
`__toString()` | Cast the helper to a string value; relies on `render()`.
`render()` | Render the helper to a string.

In addition to the method stubs from the interface, the abstract class also
implements the following methods:
Expand Down
28 changes: 14 additions & 14 deletions docs/book/helpers/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ also allows using a partial view script.

Methods in the Menu helper:

Method signature | Description
------------------------------------------------------------------------------------------- | -----------
`getUlClass() : string` | Retrieve the CSS class used when rendering `ul` elements in `renderMenu()`.
`setUlClass(string $class) : self` | Set the CSS class to use when rendering `ul` elements in `renderMenu()`.
`getOnlyActiveBranch() : bool` | Retrieve the flag specifying whether or not to render only the active branch of a container.
`setOnlyActiveBranch(bool $flag) : self` | Set the flag specifying whether or not to render only the active branch of a container.
`getRenderParents() : bool` | Retrieve the flag specifying whether or not to render parent pages when rendering the active branch of a container.
`setRenderParents(bool $flag) : self` | Set the flag specifying whether or not to render parent pages when rendering the active branch of a container. When set to `false`, only the deepest active menu will be rendered.
`getPartial() : string|array` | Retrieve a partial view script that should be used for rendering breadcrumbs. If a partial view script is set, the helper's `render()` method will use the `renderPartial()` method. The helper expects the partial to be a `string` or an `array` with two elements. If the partial is a `string`, it denotes the name of the partial script to use. If it is an `array`, the first element will be used as the name of the partial view script, and the second element is the module where the script is found.
`setPartial(string|array $partial) : self` | Set the partial view script to use when rendering breadcrumbs; see `getPartial()` for acceptable values.
`htmlify(/* ... */) : string` | Overrides the method from the abstract class, with the argument list `AbstractPage $page, bool $escapeLabel = true, bool $addClassToListItem = false`. Returns `span` elements if the page has no `href`.
`renderMenu(AbstractContainer $container = null, $options = []) : string` | Default rendering method; renders a container as an HTML `UL` list. If `$container` is not given, the container registered in the helper will be rendered. `$options` is used for overriding options specified temporarily without resetting the values in the helper instance; if none are set, those already provided to the helper will be used. Options are an associative array where each key corresponds to an option in the helper. See the table below for recognized options.
`renderPartial(AbstractContainer $container = null, string|array $partial = null) : string` | Used for rendering the menu using a partial view script.
`renderSubMenu(/* ... */) : string` | Renders the deepest menu level of a container's active branch. Accepts the arguments `AbstractContainer $container`, `string $ulClass = null`, `string|int $indent = null` (an integer value indicates number of spaces to use), `string $liActiveClass = null`.
Method signature | Description
-------------------------------------------------------------------------------------------- | -----------
`getUlClass() : string` | Retrieve the CSS class used when rendering `ul` elements in `renderMenu()`.
`setUlClass(string $class) : self` | Set the CSS class to use when rendering `ul` elements in `renderMenu()`.
`getOnlyActiveBranch() : bool` | Retrieve the flag specifying whether or not to render only the active branch of a container.
`setOnlyActiveBranch(bool $flag) : self` | Set the flag specifying whether or not to render only the active branch of a container.
`getRenderParents() : bool` | Retrieve the flag specifying whether or not to render parent pages when rendering the active branch of a container.
`setRenderParents(bool $flag) : self` | Set the flag specifying whether or not to render parent pages when rendering the active branch of a container. When set to `false`, only the deepest active menu will be rendered.
`getPartial() : string\|array` | Retrieve a partial view script that should be used for rendering breadcrumbs. If a partial view script is set, the helper's `render()` method will use the `renderPartial()` method. The helper expects the partial to be a `string` or an `array` with two elements. If the partial is a `string`, it denotes the name of the partial script to use. If it is an `array`, the first element will be used as the name of the partial view script, and the second element is the module where the script is found.
`setPartial(string\|array $partial) : self` | Set the partial view script to use when rendering breadcrumbs; see `getPartial()` for acceptable values.
`htmlify(/* ... */) : string` | Overrides the method from the abstract class, with the argument list `AbstractPage $page, bool $escapeLabel = true, bool $addClassToListItem = false`. Returns `span` elements if the page has no `href`.
`renderMenu(AbstractContainer $container = null, $options = []) : string` | Default rendering method; renders a container as an HTML `UL` list. If `$container` is not given, the container registered in the helper will be rendered. `$options` is used for overriding options specified temporarily without resetting the values in the helper instance; if none are set, those already provided to the helper will be used. Options are an associative array where each key corresponds to an option in the helper. See the table below for recognized options.
`renderPartial(AbstractContainer $container = null, string\|array $partial = null) : string` | Used for rendering the menu using a partial view script.
`renderSubMenu(/* ... */) : string` | Renders the deepest menu level of a container's active branch. Accepts the arguments `AbstractContainer $container`, `string $ulClass = null`, `string\|int $indent = null` (an integer value indicates number of spaces to use), `string $liActiveClass = null`.

The following are options recognized by the `renderMenu()` method:

Expand Down
3 changes: 2 additions & 1 deletion docs/book/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
../../README.md
<!-- markdownlint-disable -->
../../README.md

0 comments on commit 17e75f4

Please sign in to comment.