本文整理汇总了PHP中testplan::link_tcversions方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::link_tcversions方法的具体用法?PHP testplan::link_tcversions怎么用?PHP testplan::link_tcversions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::link_tcversions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TLSmarty
/**
* doAdd2testplan
*
*/
function doAdd2testplan(&$argsObj, $request)
{
$smartyObj = new TLSmarty();
$smartyObj->assign('attachments', null);
$guiObj = $this->initGuiBean($argsObj);
$guiObj->refreshTree = $argsObj->refreshTree ? 1 : 0;
$tplan_mgr = new testplan($this->db);
// $request['add2tplanid']
// main key: testplan id
// sec key : platform_id
$item2link = null;
if (isset($request['add2tplanid'])) {
foreach ($request['add2tplanid'] as $tplan_id => $platformSet) {
foreach ($platformSet as $platform_id => $dummy) {
$item2link = null;
$item2link['tcversion'][$argsObj->tcase_id] = $argsObj->tcversion_id;
$item2link['platform'][$platform_id] = $platform_id;
$item2link['items'][$argsObj->tcase_id][$platform_id] = $argsObj->tcversion_id;
$tplan_mgr->link_tcversions($tplan_id, $item2link, $argsObj->user_id);
}
}
$identity = new stdClass();
$identity->tproject_id = $argsObj->tproject_id;
$identity->id = $argsObj->tcase_id;
$identity->version_id = $argsObj->tcversion_id;
$this->tcaseMgr->show($smartyObj, $guiObj, $identity, $this->grants);
exit;
}
return $guiObj;
}
示例2: TLSmarty
/**
* doAdd2testplan
*
*/
function doAdd2testplan(&$argsObj, $request)
{
$smartyObj = new TLSmarty();
$smartyObj->assign('attachments', null);
$guiObj = $this->initGuiBean($argsObj);
$viewer_args = array();
$tplan_mgr = new testplan($this->db);
$guiObj->refreshTree = $argsObj->refreshTree ? 1 : 0;
$item2link = null;
// $request['add2tplanid']
// main key: testplan id
// sec key : platform_id
if (isset($request['add2tplanid'])) {
foreach ($request['add2tplanid'] as $tplan_id => $platformSet) {
foreach ($platformSet as $platform_id => $dummy) {
$item2link = null;
$item2link['tcversion'][$argsObj->tcase_id] = $argsObj->tcversion_id;
$item2link['platform'][$platform_id] = $platform_id;
$item2link['items'][$argsObj->tcase_id][$platform_id] = $argsObj->tcversion_id;
$tplan_mgr->link_tcversions($tplan_id, $item2link, $argsObj->user_id);
}
}
$this->tcaseMgr->show($smartyObj, $guiObj, $this->templateCfg->template_dir, $argsObj->tcase_id, $argsObj->tcversion_id, $viewer_args);
}
return $guiObj;
}