foreach($catetags as $cate){
echo Html::checkboxList('category_id','',$cate,['item'=>'customCheckbox']);
}
/**
* 自定义checkbox输出格式
*/
function customCheckbox($index, $label, $name, $checked, $value){
$cid = preg_replace('/-d+/','',$value);
$level = preg_replace('/d+-{1}/','',$value);
// $strpad = str_pad('', intval($level)*18," ",STR_PAD_LEFT);
$style = 'margin-left:'.(String)($level*20).'px';
echo "<div class='checkcate' style='{$style}'><label><input type='checkbox' name='category_id[]' value='{$cid}'><span>{$label}</span></label></div>";
}