\Phpcmf\LibraryTree

http://www.kaiqibao.net 本文件是框架系统文件,二次开发时不可以修改本文件,可以通过继承类方法来重写此文件

Summary

Methods
Properties
Constants
html_icon()
init()
get()
create()
select_linkage()
select_category()
get_tree()
get_tree_array()
get_tree_multi()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_data()
get_child()
_have()
_linkage_tree_result()
_category_tree_result()
$data
$result_array
$menu_icon
$icon
$arr
$nbsp
$deep
$count
$ret
N/A

Properties

$data

$data : 

Type

$result_array

$result_array : 

Type

$menu_icon

$menu_icon : 

Type

$icon

$icon : 

Type

$arr

$arr : 

Type

$nbsp

$nbsp : 

Type

$deep

$deep : 

Type

$count

$count : 

Type

$ret

$ret : 

Type

Methods

html_icon()

html_icon() 

设置html标签

init()

init(  $arr) 

初始化类

Parameters

$arr

get()

get(  $data) 

Parameters

$data

create()

create(  $k_id,   $adds = '') 

得到树型数组

Parameters

$k_id
$adds

select_linkage()

select_linkage(  $data,   $id,   $str,   $default = ' -- ') 

Parameters

$data
$id
$str
$default

select_category()

select_category(array  $data, \Phpcmf\Library\intval/array  $id, string  $str, string  $default = ' -- ', \Phpcmf\Library\intval  $onlysub, \Phpcmf\Library\intval  $is_push, \Phpcmf\Library\intval  $is_first) : string

栏目选择

Parameters

array $data

栏目数据

\Phpcmf\Library\intval/array $id

被选中的ID

string $str

属性

string $default

默认选项

\Phpcmf\Library\intval $onlysub

只可选择子栏目

\Phpcmf\Library\intval $is_push

是否验证权限

\Phpcmf\Library\intval $is_first

是否返回第一个可用栏目id

Returns

string

get_tree()

get_tree(  $myid,   $str,   $sid,   $adds = '',   $str_group = '') : string

得到树型结构

Parameters

$myid
$str
$sid
$adds
$str_group

Returns

string

get_tree_array()

get_tree_array(  $myid,   $str = '',   $sid,   $adds = '',   $str_group = '') : array

得到树型结构

Parameters

$myid
$str
$sid
$adds
$str_group

Returns

array

get_tree_multi()

get_tree_multi(  $myid,   $str,   $sid,   $adds = '') 

同上一方法类似,但允许多选

Parameters

$myid
$str
$sid
$adds

_data()

_data(  $data) 

Parameters

$data

get_child()

get_child(  $k_id) : array

得到子级数组

Parameters

$k_id

Returns

array

_have()

_have(  $list,   $item) 

Parameters

$list
$item

_linkage_tree_result()

_linkage_tree_result(integer  $myid, string  $str, integer  $sid, integer  $adds = '') 

用于栏目选择框

Parameters

integer $myid

要查询的ID

string $str

HTML代码方式

integer $sid

默认选中

integer $adds

前缀

_category_tree_result()

_category_tree_result(integer  $myid, string  $str,   $str2, integer  $sid, integer  $adds = '') 

用于栏目选择框

Parameters

integer $myid

要查询的ID

string $str

HTML代码方式

$str2
integer $sid

默认选中

integer $adds

前缀