本文整理汇总了PHP中M::getRoot方法的典型用法代码示例。如果您正苦于以下问题:PHP M::getRoot方法的具体用法?PHP M::getRoot怎么用?PHP M::getRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类M
的用法示例。
在下文中一共展示了M::getRoot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$params = M::getRoot();
//组装参数
$params["scope"] = "sliderbar";
//指定定查询范围
//获取菜单数组
$navarr = FrontMenu::getChildMenu($params);
$this->render('navbar', array('nav' => $navarr));
}
示例2: run
public function run()
{
//获取
$params = M::getRoot();
//组装参数
$params["scope"] = "sliderbar";
//指定定查询范围
//获取菜单数组
$navarr = FrontMenu::getChildMenu($params);
$service_arr = array('orders' => '订单管理', 'quos' => '查看报价单', 'returns' => '退货管理');
$dealer_arr = array('orders' => '订单管理', 'quos' => '管理报价单', 'returns' => '退货管理');
foreach ($navarr as $key => $val) {
if (Yii::app()->user->isServicer()) {
if ($val['name'] != '采购管理') {
unset($navarr[$key]);
continue;
}
foreach ($navarr[$key]['children'] as $k => $v) {
if ($v['name'] == $service_arr['orders']) {
$data['order'] = $v['name'];
} else {
if ($v['name'] == $service_arr['quos']) {
$data['quo'] = $v['name'];
} else {
if ($v['name'] == $service_arr['returns']) {
$data['return'] = $v['name'];
}
}
}
}
}
if (Yii::app()->user->isDealer()) {
if ($val['name'] != '销售管理') {
unset($navarr[$key]);
continue;
}
foreach ($navarr[$key]['children'] as $k => $v) {
if ($v['name'] == $dealer_arr['orders']) {
$data['order'] = $v['name'];
} else {
if ($v['name'] == $dealer_arr['quos']) {
$data['quo'] = $v['name'];
} else {
if ($v['name'] == $dealer_arr['returns']) {
$data['return'] = $v['name'];
}
}
}
}
}
}
$this->render('topnews', array('mesmenu' => $data));
}
示例3: run
public function run()
{
//获取是经销商还是服务店菜单
$params = M::getRoot();
//组装参数
$params["scope"] = "sliderbar";
//指定定查询范围
//获取菜单数组
$navarr = FrontMenu::getChildMenu($params);
foreach ($navarr as $key => $val) {
if ($val['name'] != '信息管理') {
unset($navarr[$key]);
continue;
}
}
$this->render('topNav', array('permenu' => $navarr));
}
示例4: run
public function run()
{
//大类子类数据源
$main = DefaultService::getMainCategorys(0);
$main = DefaultService::findChild($main, 0);
$maincate = DefaultService::findsub($main);
//获取是经销商还是服务店菜单
$params = M::getRoot();
//组装参数
$params["scope"] = "sliderbar";
//指定定查询范围
//获取菜单数组
$navarr = FrontMenu::getChildMenu($params);
foreach ($navarr as $key => $val) {
if ($val['name'] != '信息管理') {
unset($navarr[$key]);
continue;
}
}
$this->render('topNav', array('MainCategory' => $maincate, 'permenu' => $navarr));
}