本文整理汇总了PHP中Tree::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Tree::getOptions方法的具体用法?PHP Tree::getOptions怎么用?PHP Tree::getOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tree
的用法示例。
在下文中一共展示了Tree::getOptions方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: m
function _get_acategory_options($layer = 0)
{
$acategory_mod =& m('acategory');
$acategories = $acategory_mod->get_list();
foreach ($acategories as $key => $val) {
if ($val['code'] == ACC_SYSTEM) {
unset($acategories[$key]);
}
}
import('tree.lib');
$tree = new Tree();
$tree->setTree($acategories, 'cate_id', 'parent_id', 'cate_name');
return $tree->getOptions($layer);
}
示例2: bm
function _get_sgcategory_options()
{
$mod =& bm('gcategory', array('_store_id' => $this->_store_id));
$gcategories = $mod->get_list();
import('tree.lib');
$tree = new Tree();
$tree->setTree($gcategories, 'cate_id', 'parent_id', 'cate_name');
return $tree->getOptions();
}
示例3: bm
function _get_sgcategory_options()
{
$mod =& bm('gcategory', array('_store_id' => $this->_store_id));
$gcategories = $mod->get_list();
//LLL 本店所有商品分类多语言
$gcategories = chg_array2_string($gcategories, 'cate_name', '', true);
import('tree.lib');
$tree = new Tree();
$tree->setTree($gcategories, 'cate_id', 'parent_id', 'cate_name');
return $tree->getOptions();
}
示例4: m
function _get_scategory_options()
{
$mod =& m('scategory');
$scategories = $mod->get_list();
import('tree.lib');
$tree = new Tree();
$tree->setTree($scategories, 'cate_id', 'parent_id', 'cate_name');
return $tree->getOptions();
}
示例5: bm
function _get_gcategory_options($layer = 0)
{
$gcategory_mod =& bm('gcategory', array('_store_id' => 0));
$gcategories = $gcategory_mod->get_list();
import('tree.lib');
$tree = new Tree();
$tree->setTree($gcategories, 'cate_id', 'parent_id', 'cate_name');
return $tree->getOptions($layer);
}
示例6: m
function _get_scategory_options()
{
$mod =& m('scategory');
$scategories = $mod->get_list();
//LLL apply_app分类多语言
$scategories = chg_array2_string($scategories, 'cate_name', get_lang2(), true);
import('tree.lib');
$tree = new Tree();
$tree->setTree($scategories, 'cate_id', 'parent_id', 'cate_name');
return $tree->getOptions();
}