Tiger_Menu

@api

Tiger_Menu — the render/read facade for custom menus (Tiger_Model_Menu is the store).

Two entry points, cleanly split:

Tiger_Menu::getHTML('primary') -> rendered

. Parsed for AUTH (items the live role can't reach are hidden), labels run through Zend_Translate, hrefs resolved (page_key -> the page's current slug, else url), active item marked. Also the target of the {menu} view helper and the shortcode.

Tiger_Menu::getData('primary') -> the raw nested array (labels translated, hrefs resolved, active flagged, children nested) for a developer to render however they like. Does NOT parse for auth — it's the unfiltered tree.

getHTML compiles the tree to a Zend_Navigation (Page_Uri per item, carrying resource/privilege) and hand-walks it — the same approach the reference app uses — so ACL filtering + href + active-state ride the nav layer. The developer owns the outer container; getHTML emits only the

    (place/wrap it yourself).

    Methods

    getHTML()

    getHTML($menuKey, array $options = [])

    Render a menu to auth-filtered HTML (a <ul>).

    $options: ['class'=>ulClass,'id'=>ulId,'org'=>orgId].

    • $menuKey string — the menu key (the rows sharing this key form the tree)
    • $options array — render options: class, id, org

    Returns string — the <ul>…</ul> markup, or '' when the menu is empty or fully filtered out

    getData()

    getData($menuKey, $orgId = null)

    Return the raw menu tree as a nested array (labels translated, hrefs resolved); NO auth filter.

    • $menuKey string — the menu key
    • $orgId string|null — tenant scope (defaults to the current identity's org)

    Returns array — the nested tree (each node with label, href, active, children)