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


PHP testproject::count_all_requirements方法代码示例

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


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

示例1: initializeGui

function initializeGui(&$db, $args)
{
    $tcaseCfg = config_get('testcase_cfg');
    $reqCfg = config_get('req_cfg');
    $gui = new stdClass();
    $gui->mainTitle = '';
    $tprojectMgr = new testproject($db);
    $tcasePrefix = $tprojectMgr->getTestCasePrefix($args->tproject_id);
    $gui->tree_title = '';
    $gui->ajaxTree = new stdClass();
    $gui->ajaxTree->root_node = new stdClass();
    $gui->ajaxTree->dragDrop = new stdClass();
    $gui->ajaxTree->dragDrop->enabled = false;
    $gui->ajaxTree->dragDrop->BackEndUrl = null;
    $gui->ajaxTree->children = '';
    // Prefix for cookie used to save tree state
    $gui->ajaxTree->cookiePrefix = 'print' . str_replace(' ', '_', $args->doc_type) . '_';
    $gui->doc_type = $args->doc_type;
    switch ($args->doc_type) {
        // BUGID 3067
        case 'reqspec':
            $gui->tree_title = lang_get('title_req_print_navigator');
            $gui->ajaxTree->loader = $args->basehref . 'lib/ajax/getrequirementnodes.php?' . "root_node={$args->tproject_id}&" . "show_children=0&operation=print";
            $gui->ajaxTree->loadFromChildren = 0;
            $gui->ajaxTree->root_node->href = "javascript:TPROJECT_PTP_RS({$args->tproject_id})";
            $gui->ajaxTree->root_node->id = $args->tproject_id;
            $req_qty = $tprojectMgr->count_all_requirements($args->tproject_id);
            $gui->ajaxTree->root_node->name = htmlspecialchars($args->tproject_name) . " ({$req_qty})";
            $gui->ajaxTree->cookiePrefix .= $gui->ajaxTree->root_node->id . "_";
            $gui->mainTitle = lang_get('requirement_specification_report');
            break;
            // end BUGID 3067
        // end BUGID 3067
        case 'testspec':
            $gui->tree_title = lang_get('title_tc_print_navigator');
            $gui->ajaxTree->loader = $args->basehref . 'lib/ajax/gettprojectnodes.php?' . "root_node={$args->tproject_id}&" . "show_tcases=0&operation=print&" . "tcprefix=" . urlencode($tcasePrefix . $tcaseCfg->glue_character) . "}";
            $gui->ajaxTree->loadFromChildren = 0;
            $gui->ajaxTree->root_node->href = "javascript:TPROJECT_PTP({$args->tproject_id})";
            $gui->ajaxTree->root_node->id = $args->tproject_id;
            $tcase_qty = $tprojectMgr->count_testcases($args->tproject_id);
            $gui->ajaxTree->root_node->name = htmlspecialchars($args->tproject_name) . " ({$tcase_qty})";
            $gui->ajaxTree->cookiePrefix .= $gui->ajaxTree->root_node->id . "_";
            $gui->mainTitle = lang_get('testspecification_report');
            break;
        case 'testreport':
            $gui->mainTitle = lang_get('test_report');
            break;
        case 'testplan':
            $gui->tree_title = lang_get('title_tp_print_navigator');
            $gui->ajaxTree->loadFromChildren = 1;
            $gui->ajaxTree->loader = '';
            $gui->mainTitle = lang_get('test_plan');
            break;
    }
    $gui->mainTitle .= ' - ' . lang_get('doc_opt_title');
    $gui->outputFormat = array(FORMAT_HTML => lang_get('format_html'), FORMAT_ODT => lang_get('format_odt'), FORMAT_MSWORD => lang_get('format_msword'));
    return $gui;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:58,代码来源:printDocOptions.php

示例2: initializeGui

/**
 * Initialize gui (stdClass) object that will be used as argument
 * in call to Template Engine.
 *
 * @param class pointer args: object containing User Input and some session values
 *    TBD structure
 * 
 * ?     tprojectMgr: test project manager object.
 * ?     treeDragDropEnabled: true/false. Controls Tree drag and drop behaivor.
 * 
 * @return stdClass TBD structure
 */
function initializeGui(&$db, $args)
{
    $tcaseCfg = config_get('testcase_cfg');
    $reqCfg = config_get('req_cfg');
    $gui = new stdClass();
    $gui->showOptionsCheckBoxes = $gui->showOptions = $args->showOptions;
    $gui->showHelpIcon = $args->showHelpIcon;
    $gui->mainTitle = '';
    $gui->outputFormat = array(FORMAT_HTML => lang_get('format_html'), FORMAT_MSWORD => lang_get('format_pseudo_msword'));
    $gui->outputOptions = init_checkboxes($args);
    if ($gui->showOptions == false) {
        $loop2do = count($gui->outputOptions);
        for ($idx = 0; $idx < $loop2do; $idx++) {
            $gui->outputOptions[$idx]['checked'] = 'y';
        }
    }
    $tprojectMgr = new testproject($db);
    $tcasePrefix = $tprojectMgr->getTestCasePrefix($args->tproject_id);
    $gui->tree_title = '';
    $gui->ajaxTree = new stdClass();
    $gui->ajaxTree->root_node = new stdClass();
    $gui->ajaxTree->dragDrop = new stdClass();
    $gui->ajaxTree->dragDrop->enabled = false;
    $gui->ajaxTree->dragDrop->BackEndUrl = null;
    $gui->ajaxTree->children = '';
    // improved cookie prefix for test spec doc and req spec doc
    $gui->ajaxTree->cookiePrefix = $args->doc_type . '_doc_';
    $gui->doc_type = $args->doc_type;
    $addTestPlanID = false;
    switch ($args->doc_type) {
        case DOC_REQ_SPEC:
            $gui->showOptions = true;
            $gui->showOptionsCheckBoxes = false;
            $gui->tree_title = lang_get('title_req_print_navigator');
            $gui->ajaxTree->loader = $args->basehref . 'lib/ajax/getrequirementnodes.php?' . "root_node={$args->tproject_id}&show_children=0&operation=print";
            $gui->ajaxTree->loadFromChildren = 0;
            $gui->ajaxTree->root_node->href = "javascript:TPROJECT_PTP_RS({$args->tproject_id})";
            $gui->ajaxTree->root_node->id = $args->tproject_id;
            $req_qty = $tprojectMgr->count_all_requirements($args->tproject_id);
            $gui->ajaxTree->root_node->name = htmlspecialchars($args->tproject_name) . " ({$req_qty})";
            $gui->ajaxTree->cookiePrefix .= "tproject_id_" . $gui->ajaxTree->root_node->id . "_";
            $gui->mainTitle = lang_get('requirement_specification_report');
            break;
        case DOC_TEST_SPEC:
            $gui->tree_title = lang_get('title_tc_print_navigator');
            $gui->ajaxTree->loader = $args->basehref . 'lib/ajax/gettprojectnodes.php?' . "root_node={$args->tproject_id}&" . "show_tcases=0&operation=print&" . "tcprefix=" . urlencode($tcasePrefix . $tcaseCfg->glue_character) . "}";
            $gui->ajaxTree->loadFromChildren = 0;
            $gui->ajaxTree->root_node->href = "javascript:TPROJECT_PTP({$args->tproject_id})";
            $gui->ajaxTree->root_node->id = $args->tproject_id;
            $tcase_qty = $tprojectMgr->count_testcases($args->tproject_id);
            $gui->ajaxTree->root_node->name = htmlspecialchars($args->tproject_name) . " ({$tcase_qty})";
            $gui->ajaxTree->cookiePrefix .= "tproject_id_" . $gui->ajaxTree->root_node->id . "_";
            $gui->mainTitle = lang_get('testspecification_report');
            break;
        case DOC_TEST_PLAN_EXECUTION:
            $addTestPlanID = true;
            $gui->mainTitle = lang_get('test_report');
            break;
        case DOC_TEST_PLAN_DESIGN:
            $addTestPlanID = true;
            $gui->tree_title = lang_get('title_tp_print_navigator');
            $gui->ajaxTree->loadFromChildren = 1;
            $gui->ajaxTree->loader = '';
            $gui->mainTitle = lang_get('test_plan');
            break;
        case DOC_TEST_PLAN_EXECUTION_ON_BUILD:
            $addTestPlanID = true;
            $gui->mainTitle = lang_get('test_report_on_build');
            break;
    }
    // Do not move
    if ($args->mainTitle == '') {
        $gui->mainTitle .= ' - ' . lang_get('doc_opt_title');
    } else {
        $gui->mainTitle = $args->mainTitle;
    }
    $gui->getArguments = "&type=" . $args->doc_type;
    if ($addTestPlanID) {
        $gui->getArguments .= '&docTestPlanId=' . $args->tplan_id;
    }
    return $gui;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:94,代码来源:printDocOptions.php


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