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


PHP testplan::html_table_of_custom_field_values方法代碼示例

本文整理匯總了PHP中testplan::html_table_of_custom_field_values方法的典型用法代碼示例。如果您正苦於以下問題:PHP testplan::html_table_of_custom_field_values方法的具體用法?PHP testplan::html_table_of_custom_field_values怎麽用?PHP testplan::html_table_of_custom_field_values使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在testplan的用法示例。


在下文中一共展示了testplan::html_table_of_custom_field_values方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: renderTestSpecTreeForPrinting

function renderTestSpecTreeForPrinting(&$db, &$node, $item_type, &$options, $tocPrefix, $tcCnt, $level, $user_id, $tplan_id = 0, $tcPrefix = null, $tprojectID = 0, $platform_id = 0)
{
    static $tree_mgr;
    static $map_id_descr;
    static $tplan_mgr;
    $code = null;
    if (!$tree_mgr) {
        $tplan_mgr = new testplan($db);
        $tree_mgr = new tree($db);
        $map_id_descr = $tree_mgr->node_types;
    }
    $verbose_node_type = $map_id_descr[intval($node['node_type_id'])];
    switch ($verbose_node_type) {
        case 'testproject':
            if ($tplan_id != 0) {
                // we are printing a test plan, get it's custom fields
                $cfieldFormatting = array('table_css_style' => 'class="cf"');
                if ($options['cfields']) {
                    $cfields = $tplan_mgr->html_table_of_custom_field_values($tplan_id, 'design', null, $cfieldFormatting);
                    $code .= '<p>' . $cfields . '</p>';
                }
            }
            // platform changes - $code .= renderTOC($options);
            break;
        case 'testsuite':
            $tocPrefix .= (!is_null($tocPrefix) ? "." : '') . $tcCnt;
            $code .= renderTestSuiteNodeForPrinting($db, $node, $options, $tocPrefix, $level, $tplan_id, $tprojectID);
            break;
        case 'testcase':
            $context = new stdClass();
            $context->tproject_id = $tprojectID;
            $context->tplan_id = $tplan_id;
            $context->platform_id = $platform_id;
            $context->tcase_prefix = $tcPrefix;
            $code .= renderTestCaseForPrinting($db, $node, $options, $level, $context);
            break;
    }
    if (isset($node['childNodes']) && $node['childNodes']) {
        $childNodes = $node['childNodes'];
        $tsCnt = 0;
        $children_qty = sizeof($childNodes);
        for ($i = 0; $i < $children_qty; $i++) {
            $current = $childNodes[$i];
            if (is_null($current)) {
                continue;
            }
            if (isset($current['node_type_id']) && $map_id_descr[$current['node_type_id']] == 'testsuite') {
                $tsCnt++;
            }
            // BUGID 3459 - added $platform_id
            $code .= renderTestSpecTreeForPrinting($db, $current, $item_type, $options, $tocPrefix, $tsCnt, $level + 1, $user_id, $tplan_id, $tcPrefix, $tprojectID, $platform_id);
        }
    }
    if ($verbose_node_type == 'testproject') {
        if ($options['toc']) {
            // remove for platforms feature
            // $options['tocCode'] .= '</div><hr />';
            $code = str_replace("{{INSERT_TOC}}", $options['tocCode'], $code);
        }
    }
    return $code;
}
開發者ID:moraesmv,項目名稱:testlink-code,代碼行數:62,代碼來源:print.inc.php


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