Пример #1
0
 public function displayModelInformation()
 {
     /*$GLOBALS['phpgw_info']['flags']['noheader'] = false;
     		$GLOBALS['phpgw_info']['flags']['nofooter'] = false;
     		$GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
     		$GLOBALS['phpgw']->common->phpgw_header(true);*/
     $GLOBALS['phpgw']->xslttpl->add_file(array('bim_modelinformation'));
     $modelId = phpgw::get_var("modelId");
     //$modelId = 3;
     if (empty($modelId)) {
         // go apeshit
         echo "No modelId!";
     } else {
         $sobimInfo = new sobimmodelinformation_impl($this->db, $modelId);
         /* @var $modelInfo BimModelInformation */
         $modelInfo = $sobimInfo->getModelInformation();
         $sobimmodel = new sobimmodel_impl($this->db);
         $sobimmodel->setModelId($modelId);
         /* @var $model BimModel */
         $model = $sobimmodel->retrieveBimModelInformationById();
         $data = array('model' => $model->transformObjectToArray(), 'information' => $modelInfo->transformObjectToArray());
         $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('modelInformation' => $data));
     }
     $this->setupBimCss();
 }
 private function addDummyModel()
 {
     $modelName = self::$modelName;
     if (!$this->checkIfModelExists($modelName)) {
         $sobimmodel = new sobimmodel_impl($this->db);
         $bogusId = $this->getBogusId();
         $sobimmodel->setModelName($modelName);
         $sobimmodel->setVfsdatabaseid($bogusId);
         $sobimmodel->addBimModel();
     }
     $this->modelId = $this->getModelId($modelName);
 }
Пример #3
0
 public function testRemoveUploadedIfcModel()
 {
     $bobimmodel = new bobimmodel_impl();
     //init dependancies
     $sovfs = new sovfs_impl($this->vfsFileName, null, $this->vfsSubModule);
     $vls_db_id = $sovfs->retrieveVfsFileId();
     $sobimmodel = new sobimmodel_impl($this->db);
     $sobimmodel->setModelName($this->modelName);
     $sobimmodel->setVfsdatabaseid($vls_db_id);
     $bobimmodel->setVfsObject($sovfs);
     $bobimmodel->setSobimmodel($sobimmodel);
     $this->assertTrue($bobimmodel->removeIfcModel());
 }
Пример #4
0
 public function testSetGetVfsId()
 {
     $sobimmodel = new sobimmodel_impl($this->db);
     $sobimmodel->setVfsdatabaseid($this->vfsFileId);
     $this->assertEquals($this->vfsFileId, $sobimmodel->getVfsdatabaseid());
 }