当前位置: 首页>>代码示例>>PHP>>正文


PHP tree::get_subtree方法代码示例

本文整理汇总了PHP中tree::get_subtree方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::get_subtree方法的具体用法?PHP tree::get_subtree怎么用?PHP tree::get_subtree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tree的用法示例。


在下文中一共展示了tree::get_subtree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dBug

echo "<pre> tree - get_available_node_types()";
echo "</pre>";
$available_node_types = $tree_mgr->get_available_node_types();
new dBug($available_node_types);
echo "<pre> tree - get_node_hierarchy_info(\$node_id)";
echo "</pre>";
$node_id = 1;
echo "<pre> get_node_hierarchy_info({$node_id})";
echo "</pre>";
$node_hierachy_info = $tree_mgr->get_node_hierarchy_info($node_id);
new dBug($node_hierachy_info);
echo "<pre> tree - get_subtree(\$node_id)";
echo "</pre>";
echo "<pre> get_subtree({$node_id})";
echo "</pre>";
$subtree = $tree_mgr->get_subtree($node_id);
new dBug($subtree);
echo "<pre> tree - get_subtree(\$node_id,\$exclude_node_types=null," . "<br>" . "                              \$exclude_children_of=null,\$exclude_branches=null," . "<br>" . "                              \$and_not_in_clause='',\$bRecursive = false)";
echo "</pre>";
echo "<pre> get_subtree({$node_id},null,null,null,'',false)";
echo "</pre>";
$subtree = $tree_mgr->get_subtree($node_id, null, null, null, '', false);
new dBug($subtree);
echo "<pre> get_subtree({$node_id},null,null,null,'',true)";
echo "</pre>";
$subtree = $tree_mgr->get_subtree($node_id, null, null, null, '', true);
new dBug($subtree);
echo "<pre> tree - get_subtree_list(\$node_id)";
echo "</pre>";
echo "<pre> get_subtree_list({$node_id})";
echo "</pre>";
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:tree.class.test.php

示例2: remote_exec_testcase_set

function remote_exec_testcase_set(&$db, $parent_id, $msg)
{
    $cfield_manager = new cfield_mgr($db);
    $tree_manager = new tree($db);
    $xmlResponse = null;
    $executionResults = array();
    $node_type = $tree_manager->get_available_node_types();
    $subtree_list = $tree_manager->get_subtree($parent_id);
    foreach ($subtree_list as $_key => $_value) {
        if (is_array($_value)) {
            if ($_value['node_type_id'] == $node_type['testcase']) {
                $executionResults[$_value['id']] = executeTestCase($_value['id'], $tree_manager, $cfield_manager);
            } else {
                //Can add some logic here. If required.
                continue;
            }
        }
    }
    if ($executionResults) {
        foreach ($executionResults as $key => $value) {
            $node_info = $tree_manager->get_node_hierarchy_info($key);
            $xmlResponse .= '<tr><th colspan="2">' . lang_get('tcexec_results_for') . $node_info['name'] . "</th></tr>";
            $serverTest = 1;
            foreach ($value as $_key => $_value) {
                if ($_value != -1) {
                    $xmlResponse .= "<tr><td>" . $_key . ":</td><td>" . $_value . "</td></tr>";
                } else {
                    $serverTest = $serverTest + 1;
                }
            }
            if ($serverTest != 1) {
                $xmlResponse .= $xmlResponse .= $msg['check_server_setting'];
            }
        }
    }
    return $xmlResponse;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:37,代码来源:tcExecute.php


注:本文中的tree::get_subtree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。