Ejemplo n.º 1
0
 public static function getSysnav()
 {
     $sysmain = [[\Yii::t('navigator', 'view_cart'), 'flow.php'], [\Yii::t('navigator', 'pick_out'), 'flow.php'], [\Yii::t('navigator', 'group_buy_goods'), 'flow.php'], [\Yii::t('navigator', 'snatch'), 'flow.php'], [\Yii::t('navigator', 'tag_cloud'), 'flow.php'], [\Yii::t('navigator', 'user_center'), 'flow.php'], [\Yii::t('navigator', 'wholesale'), 'flow.php'], [\Yii::t('navigator', 'activity'), 'flow.php'], [\Yii::t('navigator', 'myship'), 'flow.php'], [\Yii::t('navigator', 'message_board'), 'flow.php'], [\Yii::t('navigator', 'quotation'), 'flow.php']];
     $sysmain[] = ['-', '-'];
     $catlist = array_merge(Category::catList(0, 0, false), ['-'], ArticleCat::articleCatList(0, 0, false));
     foreach ($catlist as $key => $val) {
         if (is_array($val)) {
             $val['view_name'] = $val['cat_name'];
             for ($i = 0; $i < $val['level']; $i++) {
                 $val['view_name'] = '&nbsp;&nbsp;&nbsp;&nbsp;' . $val['view_name'];
             }
             $val['url'] = str_replace('&amp;', '&', $val['url']);
             $val['url'] = str_replace('&', '&amp;', $val['url']);
             $sysmain[] = [$val['cat_name'], $val['url'], $val['view_name']];
         }
     }
     return $sysmain;
 }