Helper for printing <link> elements
Helper entry point
Parameters: | string|AbstractContainer – container to operate on |
---|---|
Return type: | Links |
Magic overload: Proxy calls to {@link findRelation()} or container
Examples of finder calls: <code> // METHOD // SAME AS $h->findRelNext($page); // $h->findRelation($page, ‘rel’, ‘next’) $h->findRevSection($page); // $h->findRelation($page, ‘rev’, ‘section’); $h->findRelFoo($page); // $h->findRelation($page, ‘rel’, ‘foo’); </code>
Parameters: |
|
---|---|
Return type: | mixed |
Throws : | ExceptionExceptionInterface if method does not exist in container |
Sets the helper’s render flag
The helper uses the bitwise ‘&’ operator against the hex values of the render constants. This means that the flag can is “bitwised” value of the render constants. Examples: <code> // render all links except glossary $flag = Links:RENDER_ALL ^ Links:RENDER_GLOSSARY; $helper->setRenderFlag($flag);
// render only chapters and sections $flag = Links:RENDER_CHAPTER | Links:RENDER_SECTION; $helper->setRenderFlag($flag);
// render only relations that are not native W3C relations $helper->setRenderFlag(Links:RENDER_CUSTOM);
// render all relations (default) $helper->setRenderFlag(Links:RENDER_ALL); </code>
Note that custom relations can also be rendered directly using the {@link renderLink()} method.
Parameters: | int – render flag |
---|---|
Return type: | Links fluent interface, returns self |
Returns the helper’s render flag
Return type: | int render flag |
---|
Finds all relations (forward and reverse) for the given $page
The form of the returned array: <code> // $page denotes an instance of Zend_Navigation_Page $returned = array(
- ‘rel’ => array(
- ‘alternate’ => array($page, $page, $page), ‘start’ => array($page), ‘next’ => array($page), ‘prev’ => array($page), ‘canonical’ => array($page)
), ‘rev’ => array(
‘section’ => array($page))
); </code>
Parameters: |
|
---|---|
Return type: | array related pages |
Finds relations of the given $rel=$type from $page
This method will first look for relations in the page instance, then by searching the root container if nothing was found in the page.
Parameters: |
|
---|---|
Return type: | AbstractPage|array|null page(s), or null if not found |
Throws : | ExceptionDomainException if $rel is not “rel” or “rev” |
Finds relations of given $type for $page by checking if the relation is specified as a property of $page
Parameters: |
|
---|---|
Return type: | AbstractPage|array|null page(s), or null if not found |
Finds relations of given $rel=$type for $page by using the helper to search for the relation in the root container
Parameters: |
|
---|---|
Return type: | array|null array of pages, or null if not found |
Searches the root container for the forward ‘start’ relation of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|null page or null |
Searches the root container for the forward ‘next’ relation of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to the next document in a linear sequence of documents. User agents may choose to preload the “next” document, to reduce the perceived load time.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|null page(s) or null |
Searches the root container for the forward ‘prev’ relation of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to the previous document in an ordered series of documents. Some user agents also support the synonym “Previous”.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|null page or null |
Searches the root container for forward ‘chapter’ relations of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to a document serving as a chapter in a collection of documents.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|array|null page(s) or null |
Searches the root container for forward ‘section’ relations of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to a document serving as a section in a collection of documents.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|array|null page(s) or null |
Searches the root container for forward ‘subsection’ relations of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to a document serving as a subsection in a collection of documents.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|array|null page(s) or null |
Searches the root container for the reverse ‘section’ relation of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to a document serving as a section in a collection of documents.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|null page(s) or null |
Searches the root container for the reverse ‘section’ relation of the given $page
From {@link http://www.w3.org/TR/html4/types.html#type-links}: Refers to a document serving as a subsection in a collection of documents.
Parameters: | AbstractPage – page to find relation for |
---|---|
Return type: | AbstractPage|null page(s) or null |
Returns the root container of the given page
When rendering a container, the render method still store the given container as the root container, and unset it when done rendering. This makes sure finder methods will not traverse above the container given to the render method.
Parameters: | AbstractPage – page to find root for |
---|---|
Return type: | AbstractContainer the root container of the given page |
Converts a $mixed value to an array of pages
Parameters: |
|
---|---|
Return type: | AbstractPage|array|null empty if unable to convert |
Renders the given $page as a link element, with $attrib = $relation
Parameters: |
|
---|---|
Return type: | string rendered link element |
Throws : | ExceptionDomainException if $attrib is invalid |
Full-text doc search.
Enter search terms or a module, class or function name.