本文整理汇总了PHP中tree::get_path方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::get_path方法的具体用法?PHP tree::get_path怎么用?PHP tree::get_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree
的用法示例。
在下文中一共展示了tree::get_path方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dBug
echo "<pre> tree - get_subtree_list(\$node_id)";
echo "</pre>";
echo "<pre> get_subtree_list({$node_id})";
echo "</pre>";
$subtree_list = $tree_mgr->get_subtree_list($node_id);
new dBug($subtree_list);
$path_begin_node_id = 285;
$path_end_node_id = 2;
define('TREE_ROOT', null);
define('FORMAT_FULL', 'full');
define('FORMAT_SIMPLE', 'simple');
echo "<pre> tree - get_path(\$node_id,\$to_node_id = null,\$format = 'full') ";
echo "</pre>";
echo "<pre> tree - get_path({$path_begin_node_id}) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id);
new dBug($path);
echo "<pre> tree - get_path(\$node_id,\$to_node_id = null,\$format = 'full') ";
echo "</pre>";
echo "<pre> tree - get_path({$path_begin_node_id},TREE_ROOT,FORMAT_FULL) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id, TREE_ROOT, FORMAT_FULL);
new dBug($path);
echo "<pre> tree - get_path({$path_begin_node_id},TREE_ROOT,FORMAT_SIMPLE) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id, TREE_ROOT, FORMAT_SIMPLE);
new dBug($path);
echo "<pre> tree - get_path({$path_begin_node_id},{$path_end_node_id},FORMAT_FULL) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id, $path_end_node_id, FORMAT_FULL);
new dBug($path);
示例2: array
$identity->tproject_id = $args->tproject_id;
$identity->id = $args->old_container_id;
$tsuite_mgr->show($smarty, $gui, $identity);
} else {
if ($args->do_copy) {
$user_feedback = '';
$msg = '';
$options = array('check_duplicate_name' => config_get('check_names_for_duplicates'), 'action_on_duplicate_name' => config_get('action_on_duplicate_name'), 'copy_also' => $args->copy);
$result = $tcase_mgr->copy_to($args->tcase_id, $args->new_container_id, $args->user_id, $options);
$msg = $result['msg'];
if ($result['status_ok']) {
$tree_mgr->change_child_order($args->new_container_id, $result['id'], $args->target_position, $cfg->exclude_node_types);
$ts_sep = config_get('testsuite_sep');
$tc_info = $tcase_mgr->get_by_id($args->tcase_id);
$container_info = $tree_mgr->get_node_hierarchy_info($args->new_container_id);
$container_path = $tree_mgr->get_path($args->new_container_id);
$path = '';
foreach ($container_path as $key => $value) {
$path .= $value['name'] . $ts_sep;
}
$path = trim($path, $ts_sep);
$user_feedback = sprintf(lang_get('tc_copied'), $tc_info[0]['name'], $path);
}
$gui->refreshTree = $args->refreshTree;
$viewer_args['action'] = 'copied';
$viewer_args['refreshTree'] = $args->refreshTree ? 1 : 0;
$viewer_args['msg_result'] = $msg;
$viewer_args['user_feedback'] = $user_feedback;
$identity = new stdClass();
$identity->tproject_id = $args->tproject_id;
$identity->id = $args->tcase_id;
示例3: buildCookie
/**
*
*
*/
function buildCookie(&$dbHandler, $itemID, $tprojectID, $cookiePrefix)
{
$tree_mgr = new tree($dbHandler);
$path = $tree_mgr->get_path($itemID);
$parents = array();
$parents[] = $tprojectID;
foreach ($path as $node) {
$parents[] = $node['id'];
}
array_pop($parents);
$cookieInfo['path'] = 'a:s%3A/' . implode("/", $parents);
$cookieInfo['value'] = $cookiePrefix . $tprojectID . '_ext-comp-1001';
return $cookieInfo;
}