Linking system

All links in hush are processed by Contructor helper. It can be used in two ways: as a string or as a closure.

String way

Basic structure - '{type}:{value}|{param-1}:{param-1-value}|{param-2}:{param-2-value}'. You can specify endless count of params.

Below are some examples of using it.

  • 'route:admin.index|id:5' will return a link to route admin.index with param id = 5.
  • 'page:users.index|id:5' will return a link to page users.index (which is in hush/pages config directory) with param id = 5.
  • 'action:save|id:5' will return a link to current page action save with param id = 5.
  • 'link:' will return link without processing.

Closure way

You can assing closure to link, but closure must return string or array.

String will be returned without processing.

Array should contain required params 'type' and 'name' and also can contain endless count of params. Currently it supports only 'page' and 'action' types.


Breadcrumbs consists of link_text => link, which follows the hush linking system.