本文整理汇总了PHP中category::getAlltree方法的典型用法代码示例。如果您正苦于以下问题:PHP category::getAlltree方法的具体用法?PHP category::getAlltree怎么用?PHP category::getAlltree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category
的用法示例。
在下文中一共展示了category::getAlltree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: categoryEdit
function categoryEdit()
{
$page = new page();
$categ = new category();
if (isset($_GET['cid']) and $_GET['cid'] != 0) {
$id = $_GET['cid'];
} else {
$id = 0;
}
$editthis = $categ->get($id);
$msg = $page->processCategory();
$get_all_categories = $categ->getAlltree($editthis['par_id']);
$page->printCategoryForm($get_all_categories, $editthis['name'], $id, $msg);
}
示例2: setProductsParams
function setProductsParams()
{
$categ = new category();
if (isset($_POST['search'])) {
if (isset($_POST['category'])) {
$params['cid'] = $_POST['category'];
}
if (isset($_POST['includesubcat'])) {
$params['checked'] = "checked";
$params['inclsub'] = "yes";
$params['include_subcats'] = 1;
} else {
$params['checked'] = "";
$params['inclsub'] = "no";
$params['include_subcats'] = 0;
}
} else {
$params['checked'] = "";
$params['inclsub'] = "no";
if (isset($_GET['cid'])) {
$params['cid'] = $_GET['cid'];
} else {
$params['cid'] = 0;
}
if (isset($_GET['inclsub'])) {
$params['inclsub'] = $_GET['inclsub'];
$params['checked'] = "";
if ($params['inclsub'] == "yes") {
$params['checked'] = "checked";
$params['include_subcats'] = 1;
} else {
$params['include_subcats'] = 0;
}
} else {
$params['include_subcats'] = 0;
}
}
$params['categories'] = $categ->getAlltree($params['cid']);
return $params;
}