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


PHP testproject::getByChildID方法代码示例

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


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

示例1: init_args

/**
 * 
 *
 */
function init_args(&$dbHandler)
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $iParams = array("edit" => array(tlInputParameter::STRING_N, 0, 50), "id" => array(tlInputParameter::INT_N), "tcase_id" => array(tlInputParameter::INT_N), "tcversion_id" => array(tlInputParameter::INT_N), "targetTestCase" => array(tlInputParameter::STRING_N, 0, 24), "show_path" => array(tlInputParameter::INT_N), "show_mode" => array(tlInputParameter::STRING_N, 0, 50), "tcasePrefix" => array(tlInputParameter::STRING_N, 0, 16), "tcaseExternalID" => array(tlInputParameter::STRING_N, 0, 16), "tcaseVersionNumber" => array(tlInputParameter::INT_N), "add_relation_feedback_msg" => array(tlInputParameter::STRING_N, 0, 255), "caller" => array(tlInputParameter::STRING_N, 0, 10));
    $args = new stdClass();
    R_PARAMS($iParams, $args);
    $tprojectMgr = new testproject($dbHandler);
    $cfg = config_get('testcase_cfg');
    $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
    $args->user_id = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0;
    $args->feature = $args->edit;
    $args->tcaseTestProject = null;
    $args->viewerArgs = null;
    $args->automationEnabled = 0;
    $args->requirementsEnabled = 0;
    $args->testPriorityEnabled = 0;
    $args->tcasePrefix = trim($args->tcasePrefix);
    $args->form_token = isset($_REQUEST['form_token']) ? $_REQUEST['form_token'] : 0;
    // For more information about the data accessed in session here, see the comment
    // in the file header of lib/functions/tlTestCaseFilterControl.class.php.
    $args->refreshTree = getSettingFromFormNameSpace('edit_mode', 'setting_refresh_tree_on_action');
    // Try to understan how this script was called.
    switch ($args->caller) {
        case 'navBar':
            systemWideTestCaseSearch($dbHandler, $args, $cfg->glue_character);
            break;
        case 'openTCW':
            // all data come in
            // tcaseExternalID   DOM-22
            // tcaseVersionNumber  1
            $args->targetTestCase = $args->tcaseExternalID;
            // trick for systemWideTestCaseSearch
            systemWideTestCaseSearch($dbHandler, $args, $cfg->glue_character);
            break;
        default:
            if (!$args->tcversion_id) {
                $args->tcversion_id = testcase::ALL_VERSIONS;
            }
            break;
    }
    // used to manage goback
    if (intval($args->tcase_id) > 0) {
        $args->feature = 'testcase';
        $args->id = intval($args->tcase_id);
    }
    switch ($args->feature) {
        case 'testsuite':
            $args->viewerArgs = null;
            $_SESSION['setting_refresh_tree_on_action'] = $args->refreshTree ? 1 : 0;
            break;
        case 'testcase':
            $args->viewerArgs = array('action' => '', 'msg_result' => '', 'user_feedback' => '', 'disable_edit' => 0, 'refreshTree' => 0, 'add_relation_feedback_msg' => $args->add_relation_feedback_msg);
            $args->id = is_null($args->id) ? 0 : $args->id;
            $args->tcase_id = $args->id;
            if (is_null($args->tcaseTestProject) && $args->id > 0) {
                $args->tcaseTestProject = $tprojectMgr->getByChildID($args->id);
            }
            break;
    }
    if (is_null($args->tcaseTestProject)) {
        $args->tcaseTestProject = $tprojectMgr->get_by_id($args->tproject_id);
    }
    $args->requirementsEnabled = $args->tcaseTestProject['opt']->requirementsEnabled;
    $args->automationEnabled = $args->tcaseTestProject['opt']->automationEnabled;
    $args->testPriorityEnabled = $args->tcaseTestProject['opt']->testPriorityEnabled;
    return $args;
}
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:71,代码来源:archiveData.php


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