From ce772d0faf14205639a2bbb6ada5a0dad6feaa68 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 26 Jun 2017 21:51:08 +0200 Subject: [PATCH] Escaped pipe character in markdown docs in tables --- doc/book/helpers/breadcrumbs.md | 20 +++++++------- doc/book/helpers/intro.md | 46 ++++++++++++++++----------------- doc/book/helpers/links.md | 18 ++++++------- doc/book/helpers/menu.md | 28 ++++++++++---------- doc/book/pages.md | 32 +++++++++++------------ 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/doc/book/helpers/breadcrumbs.md b/doc/book/helpers/breadcrumbs.md index cc6e150..97b4147 100644 --- a/doc/book/helpers/breadcrumbs.md +++ b/doc/book/helpers/breadcrumbs.md @@ -24,16 +24,16 @@ at level 2 even if the deepest active page is on level 3). Methods in the breadcrumbs helper: -Method signature | Description ------------------------------------------- | ----------- -`getSeparator() : string` | Retrieves the separator string to use between breadcrumbs; default is ` > `. -`setSeparator(string $separator) : self` | Set the separator string to use between breadcrumbs. -`getLinkLast() : bool` | Retrieve the flag indicating whether the last breadcrumb should be rendered as an anchor; defaults to `false`. -`setLinkLast(bool $flag) : self` | Set the flag indicating whether the last breadcrumb should be rendered as an anchor. -`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. -`renderStraight()` | The default render method used when no partial view script is present. -`renderPartial()` | Used for rendering using a partial view script. +Method signature | Description +------------------------------------------- | ----------- +`getSeparator() : string` | Retrieves the separator string to use between breadcrumbs; default is ` > `. +`setSeparator(string $separator) : self` | Set the separator string to use between breadcrumbs. +`getLinkLast() : bool` | Retrieve the flag indicating whether the last breadcrumb should be rendered as an anchor; defaults to `false`. +`setLinkLast(bool $flag) : self` | Set the flag indicating whether the last breadcrumb should be rendered as an anchor. +`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. +`renderStraight()` | The default render method used when no partial view script is present. +`renderPartial()` | Used for rendering using a partial view script. ## Basic usage diff --git a/doc/book/helpers/intro.md b/doc/book/helpers/intro.md index f97a9d2..fbef703 100644 --- a/doc/book/helpers/intro.md +++ b/doc/book/helpers/intro.md @@ -22,26 +22,26 @@ adds integration with implements the interface `Zend\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|Zend\I18n\Translator\TranslatorInterface` | Retrieve the current translator instance, if any. -`setTranslator(Zend\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|Zend\Permissions\Acl\AclInterface` | Retrieve the current ACL instance, if any. -`setAcl(Zend\Permissions\Acl\AclInterface $acl) : self` | Set an ACL instance. -`hasAcl() : bool` | Whether or not an ACL instance is present. -`getRole() : null|string|Zend\Permissions\Acl\Role\RoleInterface` | Retrieve the current ACL role instance, if any. -`setRole(string|Zend\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\|Zend\I18n\Translator\TranslatorInterface` | Retrieve the current translator instance, if any. +`setTranslator(Zend\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\|Zend\Permissions\Acl\AclInterface` | Retrieve the current ACL instance, if any. +`setAcl(Zend\Permissions\Acl\AclInterface $acl) : self` | Set an ACL instance. +`hasAcl() : bool` | Whether or not an ACL instance is present. +`getRole() : null\|string|\Zend\Permissions\Acl\Role\RoleInterface` | Retrieve the current ACL role instance, if any. +`setRole(string\|Zend\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: @@ -49,11 +49,11 @@ implements the following methods: Method signature | Description ---------------------------------------------------------------------------- | ----------- `getIndent() : string` | Retrieve the indentation string to use; default is 4 spaces. -`setIndent(string|int $indent) : self` | Set the indentation to use. In the case of an integer, this indicates the number of spaces. Indentation can be specified for all but the `Sitemap` helper. +`setIndent(string\|int $indent) : self` | Set the indentation to use. In the case of an integer, this indicates the number of spaces. Indentation can be specified for all but the `Sitemap` helper. `getMinDepth() : int` | Retrieve the minimum depth a page must have to be included in output -`setMinDepth(null|int $depth) : self` | Set the minimum depth a page must have to be included in output; `null` means no minimum. +`setMinDepth(null\|int $depth) : self` | Set the minimum depth a page must have to be included in output; `null` means no minimum. `getMaxDepth() : int` | Retrieve the maximum depth a page must have to be included in output -`setMaxDepth(null|int $depth) : self` | Set the maximum depth a page must have to be included in output; `null` means no maximum. +`setMaxDepth(null\|int $depth) : self` | Set the maximum depth a page must have to be included in output; `null` means no maximum. `getRenderInvisible() : bool` | Retrieve the flag indicating whether or not to render items marked as invisible; defaults to `false`. `setRenderInvisible(bool $flag) : self` | Set the flag indicating whether or not to render items marked as invisible. `__call() : mixed` | Proxy method calls to the registered container; this allows you to use the helper as if it were a navigation container. See [the example below](#proxying-calls-to-the-navigation-container). diff --git a/doc/book/helpers/links.md b/doc/book/helpers/links.md index 6c9ea7f..9a6de4d 100644 --- a/doc/book/helpers/links.md +++ b/doc/book/helpers/links.md @@ -98,15 +98,15 @@ link types. `RENDER_CUSTOM` denotes non-standard relations specified in pages. Methods in the links helper: -Method signature | Description ---------------------------------------------------------------------------------------- | ----------- -`getRenderFlag() : int` | Retrieves the render flag; default is `RENDER_ALL`. -`setRenderFlag(int $flag) : self` | Set the render flag; see examples below. -`findAllRelations(AbstractPage $page, int $flag = null) : array` | Finds all relations of all types for a given page. -`findRelation(AbstractPage $page, string $rel, string $type) : AbstractPage|array|null` | Finds all relations of a given type from a given page. -`searchRel*(AbstractPage $page) : AbstractPage|null` | Traverses a container to find forward relations to the `Start` page, the `Next` page, the `Prev`ious page, `Chapter`s, `Section`s, and `Subsection`s. -`searchRev*(AbstractPage $page) : AbstractPage:null` | Traverses a container to find reverse relations to `Section`s or `Subsection`s. -`renderLink(AbstractPage $page, string $attrib, string $relation) : string` | Renders a single `link` element. +Method signature | Description +----------------------------------------------------------------------------------------- | ----------- +`getRenderFlag() : int` | Retrieves the render flag; default is `RENDER_ALL`. +`setRenderFlag(int $flag) : self` | Set the render flag; see examples below. +`findAllRelations(AbstractPage $page, int $flag = null) : array` | Finds all relations of all types for a given page. +`findRelation(AbstractPage $page, string $rel, string $type) : AbstractPage\|array\|null` | Finds all relations of a given type from a given page. +`searchRel*(AbstractPage $page) : AbstractPage\|null` | Traverses a container to find forward relations to the `Start` page, the `Next` page, the `Prev`ious page, `Chapter`s, `Section`s, and `Subsection`s. +`searchRev*(AbstractPage $page) : AbstractPage\|null` | Traverses a container to find reverse relations to `Section`s or `Subsection`s. +`renderLink(AbstractPage $page, string $attrib, string $relation) : string` | Renders a single `link` element. ## Basic usage diff --git a/doc/book/helpers/menu.md b/doc/book/helpers/menu.md index f4728a8..6f6b5d0 100644 --- a/doc/book/helpers/menu.md +++ b/doc/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 specifing whether or not to render only the active branch of a container. -`setOnlyActiveBranch(bool $flag) : self` | Set the flag specifing 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 specifing whether or not to render only the active branch of a container. +`setOnlyActiveBranch(bool $flag) : self` | Set the flag specifing 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/doc/book/pages.md b/doc/book/pages.md index ecac94a..7226957 100644 --- a/doc/book/pages.md +++ b/doc/book/pages.md @@ -25,22 +25,22 @@ Read more on extending `Zend\Navigation\Page\AbstractPage` in the section ### Common page options -Key | Type | Default | Description --------- | ------------------------------------------------------------- | ------- | ----------- -label | `string` | `NULL` | A page label, such as 'Home' or 'Blog'. -fragment | `string|null` | `NULL` | A fragment identifier (anchor identifier) pointing to an anchor within a resource that is subordinate to another, primary resource. The fragment identifier introduced by a hash mark "#". Example: ``http://www.example.org/foo.html#bar`` (*bar* is the fragment identifier) -id | `string|integer` | `NULL` | An *id* tag/attribute that may be used when rendering the page, typically in an anchor element. -class | `string` | `NULL` | A *CSS* class that may be used when rendering the page, typically in an anchor element. -title | `string` | `NULL` | A short page description, typically for using as the title attribute in an anchor. -target | `string` | `NULL` | Specifies a target that may be used for the page, typically in an anchor element. -rel | `array` | `[]` | Specifies forward relations for the page. Each element in the array is a key-value pair, where the key designates the relation/link type, and the value is a pointer to the linked page. An example of a key-value pair is ``'alternate' => 'format/plain.html'``. To allow full flexibility, there are no restrictions on relation values. The value does not have to be a string. Read more about ``rel`` and ``rev`` in the section on the Links helper. -rev | `array` | `[]` | Specifies reverse relations for the page. Works exactly like rel. -order | `string|integer|null` | `NULL` | Works like order for elements in ``Zend\Form``. If specified, the page will be iterated in a specific order, meaning you can force a page to be iterated before others by setting the order attribute to a low number, e.g. -100. If a String is given, it must parse to a valid int. If ``NULL`` is given, it will be reset, meaning the order in which the page was added to the container will be used. -resource | `string|Zend\Permissions\Acl\Resource\ResourceInterface|null` | `NULL` | ACL resource to associate with the page. Read more in the section on ACL integration in view helpers. -privilege| `string|null` | `NULL` | ACL privilege to associate with the page. Read more in the section on ACL integration in view helpers. -active | `boolean` | `FALSE` | Whether the page should be considered active for the current request. If active is FALSE or not given, MVC pages will check its properties against the request object upon calling ``$page->isActive()``. -visible | `boolean` | `TRUE` | Whether page should be visible for the user, or just be a part of the structure. Invisible pages are skipped by view helpers. -pages | `array|Travsersable|null` | `NULL` | Child pages of the page. This could be an array or `Traversable` object containing either page options that can be passed to the `factory()` method, `AbstractPage` instances, or a mixture of both. +Key | Type | Default | Description +-------- | --------------------------------------------------------------- | ------- | ----------- +label | `string` | `NULL` | A page label, such as 'Home' or 'Blog'. +fragment | `string\|null` | `NULL` | A fragment identifier (anchor identifier) pointing to an anchor within a resource that is subordinate to another, primary resource. The fragment identifier introduced by a hash mark "#". Example: ``http://www.example.org/foo.html#bar`` (*bar* is the fragment identifier) +id | `string\|integer` | `NULL` | An *id* tag/attribute that may be used when rendering the page, typically in an anchor element. +class | `string` | `NULL` | A *CSS* class that may be used when rendering the page, typically in an anchor element. +title | `string` | `NULL` | A short page description, typically for using as the title attribute in an anchor. +target | `string` | `NULL` | Specifies a target that may be used for the page, typically in an anchor element. +rel | `array` | `[]` | Specifies forward relations for the page. Each element in the array is a key-value pair, where the key designates the relation/link type, and the value is a pointer to the linked page. An example of a key-value pair is ``'alternate' => 'format/plain.html'``. To allow full flexibility, there are no restrictions on relation values. The value does not have to be a string. Read more about ``rel`` and ``rev`` in the section on the Links helper. +rev | `array` | `[]` | Specifies reverse relations for the page. Works exactly like rel. +order | `string\|integer\|null` | `NULL` | Works like order for elements in ``Zend\Form``. If specified, the page will be iterated in a specific order, meaning you can force a page to be iterated before others by setting the order attribute to a low number, e.g. -100. If a String is given, it must parse to a valid int. If ``NULL`` is given, it will be reset, meaning the order in which the page was added to the container will be used. +resource | `string\|Zend\Permissions\Acl\Resource\ResourceInterface\|null` | `NULL` | ACL resource to associate with the page. Read more in the section on ACL integration in view helpers. +privilege| `string\|null` | `NULL` | ACL privilege to associate with the page. Read more in the section on ACL integration in view helpers. +active | `boolean` | `FALSE` | Whether the page should be considered active for the current request. If active is FALSE or not given, MVC pages will check its properties against the request object upon calling ``$page->isActive()``. +visible | `boolean` | `TRUE` | Whether page should be visible for the user, or just be a part of the structure. Invisible pages are skipped by view helpers. +pages | `array\|Travsersable\|null` | `NULL` | Child pages of the page. This could be an array or `Traversable` object containing either page options that can be passed to the `factory()` method, `AbstractPage` instances, or a mixture of both. > #### Custom properties >