本文整理匯總了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;
}