Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'patch-43' of https://github.com/Ore4444/zf2-documentation

… into hotfix/358
  • Loading branch information...
commit b1b4f7791dc4dbee10f979e97f6c416cd888335f 2 parents 7ede684 + c0ae092
@weierophinney weierophinney authored
Showing with 25 additions and 2 deletions.
  1. +25 −2 docs/languages/en/modules/zend.view.helpers.rst
View
27 docs/languages/en/modules/zend.view.helpers.rst
@@ -53,8 +53,31 @@ route-based *URL*\ s and *HTML* lists, as well as declaring variables. Additiona
helpers for providing values for, and rendering, the various HTML *<head>* tags, such as ``HeadTitle``,
``HeadLink``, and ``HeadScript``. The currently shipped helpers include:
-- ``url($name, $urlParams, $routeOptions, $reuseMatchedParams)``: Creates a *URL* string based on a named route. ``$urlParams`` should be an
- associative array of key/value pairs used by the particular route.
+- ``url($name, $urlParams, $routeOptions, $reuseMatchedParams)``: Creates a *URL* string based on a named route.
+ ``$urlParams`` should be an associative array of key/value pairs used by the particular route.
+
+.. code-block:: php
+ // in a configuration array (i.e. returned by module.config.php)
+ 'router' => array(
+ 'routes' => array(
+ 'auth' => array(
+ 'type' => 'segment',
+ 'options' => array(
+ 'route' => '/auth[/:action][/:id]',
+ 'constraints' => array(
+ 'action' => '[a-zA-Z][a-zA-Z0-9_-]*'
+ ),
+ 'defaults' => array(
+ 'controller' => 'solon\solon',
+ 'action' => 'index'
+ )
+ )
+ )
+ )
+ ),
+ // i.e. (in a view template)
+ <a href="<?= $this->url('auth', array('action' => 'logout', 'id' => $id)); ?>">Logout</a>
+
- ``htmlList($items, $ordered, $attribs, $escape)``: generates unordered and ordered lists based on the ``$items``
passed to it. If ``$items`` is a multidimensional array, a nested list will be built. If the ``$escape`` flag is
Please sign in to comment.
Something went wrong with that request. Please try again.