Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Helper for printing <link> elements
RENDER_ALTERNATE = '0x0001'
Details RENDER_STYLESHEET = '0x0002'
Details RENDER_START = '0x0004'
Details RENDER_NEXT = '0x0008'
Details RENDER_PREV = '0x0010'
Details RENDER_CONTENTS = '0x0020'
Details RENDER_INDEX = '0x0040'
Details RENDER_GLOSSARY = '0x0080'
Details RENDER_COPYRIGHT = '0x0100'
Details RENDER_CHAPTER = '0x0200'
Details RENDER_SECTION = '0x0400'
Details RENDER_SUBSECTION = '0x0800'
Details RENDER_APPENDIX = '0x1000'
Details RENDER_HELP = '0x2000'
Details RENDER_BOOKMARK = '0x4000'
Details RENDER_CUSTOM = '0x8000'
Details RENDER_ALL = '0xffff'
Detailsarray $_RELATIONS = 'array'Maps render constants to W3C link types
Detailsint $_renderFlag = 'self'The helper's render flag
DetailsZend_Navigation_Container $_root = ''Root container
Used for preventing methods to traverse above the container given to the {@link render()} method.
Details__call(
string $method, array $arguments
=
array
)
:
Magic overload: Proxy calls to {@link findRelation()} or container
Examples of finder calls:
// 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');
Details_convertToPages(
mixed $mixed, bool $recursive
=
true
)
:
Zend_Navigation_Page|array|nullConverts a $mixed value to an array of pages
Details_findFromProperty(
Zend_Navigation_Page $page, string $rel, string $type
)
:
Zend_Navigation_Page|array|nullFinds relations of given $type for $page by checking if the relation is specified as a property of $page
Details_findFromSearch(
Zend_Navigation_Page $page, string $rel, string $type
)
:
array|nullFinds relations of given $rel=$type for $page by using the helper to search for the relation in the root container
Details_findRoot(
Zend_Navigaiton_Page $page
)
:
Zend_Navigation_ContainerReturns 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.
DetailsfindAllRelations(
Zend_Navigation_Page $page, $flag
=
null
)
:
arrayFinds all relations (forward and reverse) for the given $page
The form of the returned array:
// $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)
)
);
DetailsfindRelation(
Zend_Navigation_Page $page, string $rel, string $type
)
:
Zend_Navigaiton_Page|array|nullFinds 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.
DetailsgetRenderFlag(
)
:
intReturns the helper's render flag
Detailslinks(
Zend_Navigation_Container $container
=
null
)
:
Zend_View_Helper_Navigation_LinksView helper entry point: Retrieves helper and optionally sets container to operate on
Detailsrender(
Zend_Navigation_Container $container
=
null
)
:
stringRenders helper
Implements {@link Zend_View_Helper_Navigation_Helper::render()}.
DetailsrenderLink(
Zend_Navigation_Page $page, string $attrib, string $relation
)
:
stringRenders the given $page as a link element, with $attrib = $relation
DetailssearchRelChapter(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|array|nullSearches 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.
DetailssearchRelNext(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|nullSearches 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.
DetailssearchRelPrev(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|nullSearches 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".
DetailssearchRelSection(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|array|nullSearches 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.
DetailssearchRelStart(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|nullSearches 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.
DetailssearchRelSubsection(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|array|nullSearches 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.
DetailssearchRevSection(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|nullSearches 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.
DetailssearchRevSubsection(
Zend_Navigation_Page $page
)
:
Zend_Navigation_Page|nullSearches 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.
DetailssetRenderFlag(
int $renderFlag
)
:
Zend_View_Helper_Navigation_LinksSets 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:
// render all links except glossary
$flag = Zend_View_Helper_Navigation_Links:RENDER_ALL ^
Zend_View_Helper_Navigation_Links:RENDER_GLOSSARY;
$helper->setRenderFlag($flag);
// render only chapters and sections $flag = Zend_View_Helper_Navigation_Links:RENDER_CHAPTER | Zend_View_Helper_Navigation_Links:RENDER_SECTION; $helper->setRenderFlag($flag);
// render only relations that are not native W3C relations $helper->setRenderFlag(Zend_View_Helper_Navigation_Links:RENDER_CUSTOM);
// render all relations (default) $helper->setRenderFlag(Zend_View_Helper_Navigation_Links:RENDER_ALL);
Note that custom relations can also be rendered directly using the {@link renderLink()} method.
Details