當前位置: 首頁>>代碼示例>>PHP>>正文


PHP tree::get_path方法代碼示例

本文整理匯總了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);
開發者ID:tamtrong,項目名稱:testlink,代碼行數:31,代碼來源:tree.class.test.php

示例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;
開發者ID:moraesmv,項目名稱:testlink-code,代碼行數:31,代碼來源:tcEdit.php

示例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;
}
開發者ID:mweyamutsvene,項目名稱:testlink,代碼行數:18,代碼來源:ltx.php


注:本文中的tree::get_path方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。