本文整理匯總了PHP中common\models\Category::catList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Category::catList方法的具體用法?PHP Category::catList怎麽用?PHP Category::catList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common\models\Category
的用法示例。
在下文中一共展示了Category::catList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getSysnav
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'] = ' ' . $val['view_name'];
}
$val['url'] = str_replace('&', '&', $val['url']);
$val['url'] = str_replace('&', '&', $val['url']);
$sysmain[] = [$val['cat_name'], $val['url'], $val['view_name']];
}
}
return $sysmain;
}