diff --git a/docs/book/helpers/intro.md b/docs/book/helpers/intro.md index 2263f83f..99b62826 100644 --- a/docs/book/helpers/intro.md +++ b/docs/book/helpers/intro.md @@ -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: diff --git a/docs/book/helpers/menu.md b/docs/book/helpers/menu.md index ff16fb37..e135fe17 100644 --- a/docs/book/helpers/menu.md +++ b/docs/book/helpers/menu.md @@ -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: diff --git a/docs/book/index.md b/docs/book/index.md index fe840054..30b0c3ef 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1 +1,2 @@ -../../README.md \ No newline at end of file + +../../README.md