本文整理汇总了PHP中tree::get_node_hierarchy_info方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::get_node_hierarchy_info方法的具体用法?PHP tree::get_node_hierarchy_info怎么用?PHP tree::get_node_hierarchy_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree
的用法示例。
在下文中一共展示了tree::get_node_hierarchy_info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init_args
/**
* init_args
*
*/
function init_args(&$dbHandler)
{
// take care of proper escaping when magic_quotes_gpc is enabled
$_REQUEST = strings_stripSlashes($_REQUEST);
$iParams = array("requirement_id" => array(tlInputParameter::INT_N), "req_spec_id" => array(tlInputParameter::INT_N), "containerID" => array(tlInputParameter::INT_N), "reqDocId" => array(tlInputParameter::STRING_N, 0, 64), "req_title" => array(tlInputParameter::STRING_N, 0, 100), "scope" => array(tlInputParameter::STRING_N), "reqStatus" => array(tlInputParameter::STRING_N, 0, 1), "reqType" => array(tlInputParameter::STRING_N, 0, 1), "countReq" => array(tlInputParameter::INT_N), "expected_coverage" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 20), "req_id_cbox" => array(tlInputParameter::ARRAY_INT), "itemSet" => array(tlInputParameter::ARRAY_INT), "testcase_count" => array(tlInputParameter::ARRAY_INT), "req_version_id" => array(tlInputParameter::INT_N), "copy_testcase_assignment" => array(tlInputParameter::CB_BOOL), "relation_id" => array(tlInputParameter::INT_N), "relation_source_req_id" => array(tlInputParameter::INT_N), "relation_type" => array(tlInputParameter::STRING_N), "relation_destination_req_doc_id" => array(tlInputParameter::STRING_N, 0, 64), "relation_destination_testproject_id" => array(tlInputParameter::INT_N), "save_rev" => array(tlInputParameter::INT_N), "do_save" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N), "log_message" => array(tlInputParameter::STRING_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$args->req_id = $args->requirement_id;
$args->title = $args->req_title;
$args->arrReqIds = $args->req_id_cbox;
$args->basehref = $_SESSION['basehref'];
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->user_id = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0;
$args->user = $_SESSION['currentUser'];
// to avoid database errors with null value
if (!is_numeric($args->expected_coverage)) {
$args->expected_coverage = 0;
}
$uk = 'setting_refresh_tree_on_action';
$args->refreshTree = testproject::getUserChoice($args->tproject_id, array('reqTreeRefreshOnAction'));
$args->stay_here = isset($_REQUEST['stay_here']) ? 1 : 0;
return $args;
}
示例2: init_args
/**
* create object with all user inputs
*
*/
function init_args(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$args = new stdClass();
$key2search = array('doAction', 'cfield', 'display_order', 'location', 'hidden_active_cfield', 'active_cfield', 'hidden_required_cfield', 'required_cfield');
foreach ($key2search as $key) {
$args->{$key} = isset($_REQUEST[$key]) ? $_REQUEST[$key] : null;
}
// Need comments
if (!$args->cfield) {
$args->cfield = array();
}
$args->tproject_name = '';
$args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
if ($args->tproject_id == 0) {
$args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
}
if ($args->tproject_id > 0) {
$mgr = new tree($dbHandler);
$dummy = $mgr->get_node_hierarchy_info($args->tproject_id, null, array('nodeType' => 'testproject'));
if (is_null($dummy)) {
throw new Exception("Unable to get Test Project ID");
}
$args->tproject_name = $dummy['name'];
}
return $args;
}
示例3: init_args
function init_args(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$args = new stdClass();
$args->show_help = isset($_REQUEST['level']) && $_REQUEST['level'] == 'testproject';
$args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
$args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
$args->tplan_name = '';
if ($args->tplan_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tplan_id);
$args->tplan_name = $dummy['name'];
}
$args->node_type = isset($_REQUEST['level']) ? $_REQUEST['level'] : OFF;
$args->node_id = isset($_REQUEST['id']) ? $_REQUEST['id'] : ERROR;
// Sets urgency for suite
if (isset($_REQUEST['high_urgency'])) {
$args->urgency = HIGH;
} elseif (isset($_REQUEST['medium_urgency'])) {
$args->urgency = MEDIUM;
} elseif (isset($_REQUEST['low_urgency'])) {
$args->urgency = LOW;
} else {
$args->urgency = OFF;
}
// Sets urgency for every single tc
if (isset($_REQUEST['urgency'])) {
$args->urgency_tc = $_REQUEST['urgency'];
}
return $args;
}
示例4: init_args
function init_args(&$dbHandler)
{
$args = new stdClass();
$args->tproject_name = '';
$args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->basehref = $_SESSION['basehref'];
return $args;
}
示例5: init_args
function init_args(&$dbHandler)
{
$argsObj = new stdClass();
$argsObj->tproject_name = '';
$argsObj->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
if ($argsObj->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($argsObj->tproject_id);
$argsObj->tproject_name = $dummy['name'];
}
// new dbug($argsObj, array('calledFrom' => ' file: ' . basename(__FILE__) . ' - function: ' . __FUNCTION__));
return $argsObj;
}
示例6: init_args
/**
* create object with all user inputs
*
* @internal revisions
* 20110417 - franciscom - BUGID 4429: Code refactoring to remove global coupling as much as possible
*/
function init_args(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$args = new stdClass();
$args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
return $args;
}
示例7: init_args
function init_args(&$dbHandler, $dateFormat)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$args = new stdClass();
// BUGID 3716
$args->target_date_original = isset($_REQUEST['target_date']) ? $_REQUEST['target_date'] : null;
$args->start_date_original = isset($_REQUEST['start_date']) ? $_REQUEST['start_date'] : null;
// convert target date to iso format to write to db
if (isset($_REQUEST['target_date']) && $_REQUEST['target_date'] != '') {
$date_array = split_localized_date($_REQUEST['target_date'], $dateFormat);
if ($date_array != null) {
// set date in iso format
$args->target_date = $date_array['year'] . "-" . $date_array['month'] . "-" . $date_array['day'];
}
}
// convert start date to iso format to write to db
if (isset($_REQUEST['start_date']) && $_REQUEST['start_date'] != '') {
$date_array = split_localized_date($_REQUEST['start_date'], $dateFormat);
if ($date_array != null) {
// set date in iso format
$args->start_date = $date_array['year'] . "-" . $date_array['month'] . "-" . $date_array['day'];
}
}
$key2loop = array('low_priority_tcases', 'medium_priority_tcases', 'high_priority_tcases');
foreach ($key2loop as $key) {
$args->{$key} = isset($_REQUEST[$key]) ? intval($_REQUEST[$key]) : 0;
}
$args->id = isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
$args->name = isset($_REQUEST['milestone_name']) ? $_REQUEST['milestone_name'] : null;
$args->doAction = isset($_REQUEST['doAction']) ? $_REQUEST['doAction'] : null;
$args->basehref = $_SESSION['basehref'];
$treeMgr = new tree($dbHandler);
$tprojectMgr = new testproject($dbHandler);
$args->tproject_options = new stdClass();
$args->tproject_options->testPriorityEnabled = 0;
$args->tproject_name = '';
$args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
if ($args->tproject_id > 0) {
$info = $tprojectMgr->get_by_id($args->tproject_id);
$args->tproject_name = $info['name'];
$args->tproject_options = $info['opt'];
}
$args->tplan_name = '';
$args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
if ($args->tplan_id > 0) {
$info = $treeMgr->get_node_hierarchy_info($args->tplan_id);
$args->tplan_name = $info['name'];
}
return $args;
}
示例8: init_args
function init_args(&$dbHandler, $cfgObj)
{
$args = new stdClass();
$_REQUEST = strings_stripSlashes($_REQUEST);
$tplan_mgr = new testplan($dbHandler);
// Settings we put on session to create some sort of persistent scope,
// because we have had issues when passing this info using GET mode (size limits)
//
// we get info about build_id, platform_id, etc ...
getContextFromGlobalScope($args);
$args->user = $_SESSION['currentUser'];
$args->user_id = $args->user->dbID;
$args->caller = isset($_REQUEST['caller']) ? $_REQUEST['caller'] : 'exec_feature';
$args->reload_caller = false;
$args->tplan_id = intval(isset($_REQUEST['tplan_id']) ? $_REQUEST['tplan_id'] : $_SESSION['testplanID']);
$args->tproject_id = intval(isset($_REQUEST['tproject_id']) ? $_REQUEST['tproject_id'] : $_SESSION['testprojectID']);
if ($args->tproject_id <= 0) {
$tree_mgr = new tree($dbHandler);
$dm = $tree_mgr->get_node_hierarchy_info($args->tplan_id);
$args->tproject_id = $dm['parent_id'];
}
if (is_null($args->build_id) || $args->build_id == 0) {
// Go for the build
// this info can be present in session, then we will try different ways
// ATTENTION:
// give a look to tlTestCaseFilterControl.class.php method init_setting_build()
//
$key = $args->tplan_id . '_stored_setting_build';
$args->build_id = isset($_SESSION[$key]) ? intval($_SESSION[$key]) : null;
if (is_null($args->build_id)) {
$args->build_id = $tplan_mgr->get_max_build_id($args->tplan_id, 1, 1);
}
}
if (is_null($args->platform_id) || $args->platform_id <= 0) {
// Go for the platform (if any exists)
// this info can be present in session, then we will try different ways
// ATTENTION:
// give a look to tlTestCaseFilterControl.class.php method init_setting_platform()
//
$itemSet = $tplan_mgr->getPlatforms($args->tplan_id);
if (!is_null($itemSet)) {
$key = $args->tplan_id . '_stored_setting_platform';
$args->platform_id = isset($_SESSION[$key]) ? intval($_SESSION[$key]) : null;
if (is_null($args->platform_id) || $args->platform_id <= 0) {
$args->platform_id = $itemSet[0]['id'];
}
}
}
return array($args, $tplan_mgr);
}
示例9: init_args
function init_args(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$args = new stdClass();
$iParams = array("doAction" => array(tlInputParameter::STRING_N, 0, 50), "export_filename" => array(tlInputParameter::STRING_N, 0, 255), "exportType" => array(tlInputParameter::STRING_N, 0, 255), "tproject_id" => array(tlInputParameter::INT_N));
R_PARAMS($iParams, $args);
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
return $args;
}
示例10: init_args
/**
*
*/
function init_args(&$dbHandler)
{
$iParams = array("item_id" => array(tlInputParameter::INT_N), "showContextInfo" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$args->tproject_name = null;
if ($args->tproject_id > 0) {
$mgr = new tree($dbHandler);
$dummy = $mgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->user = $_SESSION['currentUser'];
$args->userID = $args->user->dbID;
return $args;
}
示例11: init_args
/**
*
*/
function init_args(&$dbHandler)
{
$iParams = array("req_spec_id" => array(tlInputParameter::INT_N), "refreshTree" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$args->refreshTree = intval($args->refreshTree);
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->user = $_SESSION['currentUser'];
return $args;
}
示例12: init_args
/**
* @return object returns the arguments for the page
*/
function init_args(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$args = new stdClass();
$iParams = array("UploadFile" => array(tlInputParameter::STRING_N, 0, 1), "importType" => array(tlInputParameter::STRING_N, 0, 100), "tproject_id" => array(tlInputParameter::INT_N));
R_PARAMS($iParams, $args);
$args->UploadFile = $args->UploadFile != "" ? 1 : 0;
$args->fInfo = isset($_FILES['uploadedFile']) ? $_FILES['uploadedFile'] : null;
$args->source = isset($args->fInfo['tmp_name']) ? $args->fInfo['tmp_name'] : null;
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
return $args;
}
示例13: init_args
/**
*
*/
function init_args(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$iParams = array("requirement_id" => array(tlInputParameter::INT_N), "req_version_id" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N), "req_spec_id" => array(tlInputParameter::INT_N), "showReqSpecTitle" => array(tlInputParameter::INT_N), "refreshTree" => array(tlInputParameter::INT_N), "relation_add_result_msg" => array(tlInputParameter::STRING_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$args->req_id = $args->requirement_id;
$args->refreshTree = intval($args->refreshTree);
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->user = $_SESSION['currentUser'];
$args->userID = $args->user->dbID;
return $args;
}
示例14: init_args
function init_args(&$dbHandler)
{
$iParams = array("tproject_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$treeMgr = new tree($dbHandler);
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->tplan_name = '';
if ($args->tplan_id > 0) {
$dummy = $treeMgr->get_node_hierarchy_info($args->tplan_id);
$args->tplan_name = $dummy['name'];
}
return $args;
}
示例15: init_args
/**
* @return object returns the arguments for the page
*/
function init_args(&$dbHandler)
{
$args = new stdClass();
$_REQUEST = strings_stripSlashes($_REQUEST);
$source = sizeof($_POST) ? "POST" : "GET";
$iParams = array("doAction" => array($source, tlInputParameter::STRING_N, 0, 50), "id" => array($source, tlInputParameter::INT_N), "keyword" => array($source, tlInputParameter::STRING_N, 0, 100), "notes" => array($source, tlInputParameter::STRING_N), "tproject_id" => array($source, tlInputParameter::INT_N));
$pParams = I_PARAMS($iParams);
$args = new stdClass();
$args->doAction = $pParams["doAction"];
$args->keyword_id = $pParams["id"];
$args->keyword = $pParams["keyword"];
$args->notes = $pParams["notes"];
$args->tproject_name = '';
if (($args->tproject_id = $pParams["tproject_id"]) > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
return $args;
}