我试图在yml中实现这样的结构:
$admin_menu_items = array(
array(
"label" => "thisisalabel"
"sub_menu_items" => array(
array("label" => "anotherlabel", "route" => "routename"),
array("label" => "thirdlabel", "route" => "anotherroutename")
)
)
);
到目前为止,我已经尝试过这个但没有成功:
admin_menu_items:
- { label: "thisisalabel", sub_menu_items:
- { label: "anotherlabel", route: "routename" }
- { label: "thirdlabel", route: "anotherroutename" }
}
你能帮助我找出正确的方法吗?
最后,我根据Qoop的答案使用了溶剂。这是:
admin_menu_items:
-
label: "thisisalabel"
sub_menu_items:
- { label: "anotherlabel", route: "routename" }
- { label: "thirdlabel", route: "anotherroutename" }
答案 0 :(得分:1)
我认为这可能会这样做..
admin_menu_items:
-
label: "thisisalabel"
sub_menu_items:
-
label: "anotherlabel"
route: "routename"
-
label: "thirdlabel"
route: "anotherroutename"