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


PHP testplan::countLinkedTCVersionsByPlatform方法代碼示例

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


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

示例1: stdClass

$gui = new stdClass();
$gui->platform_assignment_subtitle = null;
$gui->tplan_id = $args->tplan_id;
$gui->tproject_id = $args->tproject_id;
$gui->can_do = isset($args->tplan_id);
$gui->mainTitle = lang_get('add_remove_platforms');
$gui->warning = '';
if (isset($args->tplan_id)) {
    // do following check to give warning to user
    // if test plan has test case versions with platform_id=0
    // this means that right now there are not platforms linked to test plan.
    // Give message to user with following info:
    // Till you are not going to assign a platform to this linked tcversions
    // and it's execution results he/she will not be able to execute
    //
    $qtyByPlatform = $tplan_mgr->countLinkedTCVersionsByPlatform($args->tplan_id);
    $qtyLinked2Unknown = isset($qtyByPlatform[0]['qty']) ? $qtyByPlatform[0]['qty'] : 0;
    if ($fix_needed = $qtyLinked2Unknown > 0) {
        $gui->warning = lang_get('unknown_platform');
    }
    $opt_cfg->global_lbl = '';
    $opt_cfg->additional_global_lbl = null;
    $opt_cfg->from->lbl = lang_get('available_platforms');
    $opt_cfg->to->lbl = lang_get('assigned_platforms');
    $gui->platform_count_js = init_option_panels($tplan_mgr, $platform_mgr, $opt_cfg, $args);
    $tplanData = $tplan_mgr->get_by_id($args->tplan_id);
    if (isset($tplanData)) {
        $gui->mainTitle = sprintf($gui->mainTitle, $tplanData['name']);
    }
    if ($args->doAction == 'doAssignPlatforms') {
        $platform_mgr->linkToTestplan($args->platformsToAdd, $args->tplan_id);
開發者ID:moraesmv,項目名稱:testlink-code,代碼行數:31,代碼來源:platformsAssign.php


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