我将以下数组传递给:
$container = new Zend_Navigation($fullmenu);
$this->view->navigation()->setContainer($container);
数组(用 print_r 转储):
Array (
[0] => Array (
[label] => menu
[module] => admin
[controller] => menu
[action] => index
[resource] =>
[class] => settings hidden-xs hidden-sm
)
[1] => Array (
[label] => Users
[module] => admin
[controller] => user
[action] => index
[resource] =>
[pages] => Array (
[0] => Array (
[label] => Add User
[module] => admin
[controller] => user
[action] => create
[resource] =>
)
[1] => Array (
[label] => List Users
[module] => admin
[controller] => user
[action] => list
[resource] =>
)
[2] => Array (
[label] => Audit Trail
[module] => admin
[controller] => user
[action] => trail
[resource] =>
)
)
[class] => dropdown-toggle
)
[2] => Array (
[label] => reports
[module] => admin
[controller] => reports
[action] => index
[resource] =>
[class] => settings hidden-xs hidden-sm
)
[3] => Array (
[label] => tests
[module] => admin
[controller] => tests
[action] => index
[resource] =>
[class] => settings hidden-xs hidden-sm
)
[4] => Array (
[label] => Services
[module] => admin
[controller] => services
[action] => index
[resource] =>
[class] => settings hidden-xs hidden-sm
)
[5] => Array (
[label] => sports
[module] => admin
[controller] => sports
[action] => index
[resource] =>
[pages] => Array (
[0] => Array (
[label] => Register New sports
[module] => admin
[controller] => sports
[action] => register
[resource] => portal:smme.register
)
)
[class] => dropdown-toggle
)
)
但是菜单在输出中没有正确呈现,因为href's
结果没有显示action
在url
.
换句话说,注册新运动只显示: 注册新运动
因此它们始终采用以下形式:/module/controller 例如。管理员/用户