/**
 * Get infos about the attachments of a given object
 * 
 * @param tlObjectWithAttachments $object The object whose attachment should be fetched
 * @param int $fkid the id of the object (attachments.fk_id);
 * @param bool $storeListInSession if true, the attachment list will be stored within the session
 * @param int $counter if $counter > 0 the attachments are appended to existing attachments within the session
 *
 * @return array returns infos about the attachment on success, NULL else
 */
function getAttachmentInfosFrom(&$object, $fkid, $storeListInSession = true, $counter = 0)
{
    $attachmentInfos = $object->getAttachmentInfos($fkid);
    if ($storeListInSession) {
        storeAttachmentsInSession($attachmentInfos, $counter);
    }
    return $attachmentInfos;
}
 /** 
  * Class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->cfield_mgr = new cfield_mgr($this->db);
     tlObjectWithAttachments::__construct($this->db, 'nodes_hierarchy');
     $this->object_table = $this->tables['testprojects'];
 }
 /** 
  * Class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->debugMsg = 'Class:' . __CLASS__ . ' - Method: ';
     tlObjectWithAttachments::__construct($this->db, 'nodes_hierarchy');
     $this->object_table = $this->tables['testprojects'];
 }
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->tree_mgr = new tree($this->db);
     $this->node_types_descr_id = $this->tree_mgr->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->my_node_type = $this->node_types_descr_id['requirement_spec'];
     $this->attachmentTableName = 'req_specs';
     tlObjectWithAttachments::__construct($this->db, $this->attachmentTableName);
     $this->object_table = $this->tables['req_specs'];
 }
 /** 
  * Class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->cfg = new stdClass();
     $this->cfg->testcase = config_get('testcase_cfg');
     $this->cfg->results = config_get('results');
     $this->cfg->nodeTypeCode = $this->tree_manager->get_available_node_types();
     $this->cfg->nodeCodeType = array_flip($this->cfg->nodeTypeCode);
     tlObjectWithAttachments::__construct($this->db, 'nodes_hierarchy');
     $this->object_table = $this->tables['testprojects'];
 }
 /**
  * testplan class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->node_types_descr_id = $this->tree_manager->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->my_node_type = $this->node_types_descr_id['testsuite'];
     $this->cfield_mgr = new cfield_mgr($this->db);
     // ATTENTION:
     // second argument is used to set $this->attachmentTableName,property that this calls
     // get from his parent
     // tlObjectWithAttachments::__construct($this->db,'nodes_hierarchy');
     parent::__construct($this->db, "nodes_hierarchy");
     // Must be setted AFTER call to parent constructor
     $this->object_table = $this->tables['testsuites'];
 }
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->tree_mgr = new tree($this->db);
     $this->req_mgr = new requirement_mgr($this->db);
     $this->node_types_descr_id = $this->tree_mgr->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->my_node_type = $this->node_types_descr_id['requirement_spec'];
     $this->attachmentTableName = 'req_specs';
     tlObjectWithAttachments::__construct($this->db, $this->attachmentTableName);
     $this->object_table = $this->tables['req_specs'];
     $this->field_size = config_get('field_size');
     $this->relationsCfg = new stdClass();
     $this->relationsCfg->interProjectLinking = config_get('req_cfg')->relations->interproject_linking;
 }
 /**
  * testplan class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->node_types_descr_id = $this->tree_manager->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->assignment_mgr = new assignment_mgr($this->db);
     $this->assignment_types = $this->assignment_mgr->get_available_types();
     $this->assignment_status = $this->assignment_mgr->get_available_status();
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->tcase_mgr = new testcase($this->db);
     $this->platform_mgr = new tlPlatform($this->db);
     $this->cfg = new stdClass();
     $this->cfg->results = config_get('results');
     $this->cfg->status_not_run = $this->cfg->results['status_code']['not_run'];
     tlObjectWithAttachments::__construct($this->db, 'testplans');
 }
 /**
  * testplan class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->node_types_descr_id = $this->tree_manager->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->assignment_mgr = new assignment_mgr($this->db);
     $this->assignment_types = $this->assignment_mgr->get_available_types();
     $this->assignment_status = $this->assignment_mgr->get_available_status();
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->tcase_mgr = new testcase($this->db);
     $this->platform_mgr = new tlPlatform($this->db);
     $this->resultsCfg = config_get('results');
     $this->tcaseCfg = config_get('testcase_cfg');
     // special values used too many times
     $this->notRunStatusCode = $this->resultsCfg['status_code']['not_run'];
     $this->execTaskCode = intval($this->assignment_types['testcase_execution']['id']);
     tlObjectWithAttachments::__construct($this->db, 'testplans');
 }
Exemple #10
0
 /**
  * testplan class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tproject_mgr = new testproject($this->db);
     $this->tree_manager =& $this->tproject_mgr->tree_manager;
     $this->node_types_descr_id = $this->tree_manager->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->my_node_type = $this->node_types_descr_id['testcase'];
     $this->assignment_mgr = new assignment_mgr($this->db);
     $this->assignment_types = $this->assignment_mgr->get_available_types();
     $this->assignment_status = $this->assignment_mgr->get_available_status();
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->execution_types = $this->getExecutionTypes();
     $this->cfg = new stdClass();
     $this->cfg->testcase = config_get('testcase_cfg');
     $this->cfg->execution = config_get('exec_cfg');
     // CORTADO
     // ATTENTION:
     // second argument is used to set $this->attachmentTableName,property that this calls
     // get from his parent
     parent::__construct($this->db, "nodes_hierarchy");
 }
Exemple #11
0
 /**
  * testplan class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tree_manager = new tree($this->db);
     $this->node_types_descr_id = $this->tree_manager->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->assignment_mgr = new assignment_mgr($this->db);
     $this->assignment_types = $this->assignment_mgr->get_available_types();
     $this->assignment_status = $this->assignment_mgr->get_available_status();
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->tcase_mgr = new testcase($this->db);
     $this->platform_mgr = new tlPlatform($this->db);
     tlObjectWithAttachments::__construct($this->db, 'testplans');
 }
 /**
  * Use specific object manager, to get infos about it's attachments.
  * 
  * @param tlObjectWithAttachments $object The object whose attachment should be fetched
  * @param int $itemID the id of the object that owns the attachment (attachments.fk_id);
  * @param bool $storeListInSession if true, the attachment list will be stored within the session
  * @param int $counter if $counter > 0 the attachments are appended to existing attachments within the session
  *
  * @return array returns infos about the attachment on success, NULL else
  */
 function getAttachMetaDataViaObject(&$object, $itemID, $storeListInSession = true, $counter = 0)
 {
     $attach = $object->getAttachmentInfos($itemID);
     if ($storeListInSession) {
         storeAttachmentsInSession($attach, $counter);
     }
     return $attach;
 }
Exemple #13
0
 /**
  * testplan class constructor
  * 
  * @param resource &$db reference to database handler
  */
 function __construct(&$db)
 {
     $this->db =& $db;
     $this->tproject_mgr = new testproject($this->db);
     $this->tree_manager =& $this->tproject_mgr->tree_manager;
     $this->node_types_descr_id = $this->tree_manager->get_available_node_types();
     $this->node_types_id_descr = array_flip($this->node_types_descr_id);
     $this->my_node_type = $this->node_types_descr_id['testcase'];
     $this->assignment_mgr = new assignment_mgr($this->db);
     $this->assignment_types = $this->assignment_mgr->get_available_types();
     $this->assignment_status = $this->assignment_mgr->get_available_status();
     $this->cfield_mgr = new cfield_mgr($this->db);
     $this->execution_types = array(TESTCASE_EXECUTION_TYPE_MANUAL => lang_get('manual'), TESTCASE_EXECUTION_TYPE_AUTO => lang_get('automated'));
     // ATTENTION:
     // second argument is used to set $this->attachmentTableName,property that this calls
     // get from his parent
     parent::__construct($this->db, "nodes_hierarchy");
 }