当前位置: 首页>>代码示例>>PHP>>正文


PHP AppDocument::setDriveDownload方法代码示例

本文整理汇总了PHP中AppDocument::setDriveDownload方法的典型用法代码示例。如果您正苦于以下问题:PHP AppDocument::setDriveDownload方法的具体用法?PHP AppDocument::setDriveDownload怎么用?PHP AppDocument::setDriveDownload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppDocument的用法示例。


在下文中一共展示了AppDocument::setDriveDownload方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addCasesOutputDocument


//.........这里部分代码省略.........
         if (!isset($aOD['OUT_DOC_BOTTOM_MARGIN'])) {
             $aOD['OUT_DOC_BOTTOM_MARGIN'] = '15';
         }
         $aProperties['media'] = $aOD['OUT_DOC_MEDIA'];
         $aProperties['margins'] = array('left' => $aOD['OUT_DOC_LEFT_MARGIN'], 'right' => $aOD['OUT_DOC_RIGHT_MARGIN'], 'top' => $aOD['OUT_DOC_TOP_MARGIN'], 'bottom' => $aOD['OUT_DOC_BOTTOM_MARGIN']);
         if (isset($aOD['OUT_DOC_REPORT_GENERATOR'])) {
             $aProperties['report_generator'] = $aOD['OUT_DOC_REPORT_GENERATOR'];
         }
         $this->generate($outputID, $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (bool) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'], $aProperties, $applicationUid);
         /*----------------------------------********---------------------------------*/
         $licensedFeatures =& \PMLicensedFeatures::getSingleton();
         if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
             \G::LoadClass("pmDrive");
             $pmDrive = new \PMDrive();
             if ($pmDrive->getStatusService()) {
                 $app = new \Application();
                 $user = new \Users();
                 $dataUser = $user->load($userUid);
                 $pmDrive->setDriveUser($dataUser['USR_EMAIL']);
                 $appData = $app->Load($applicationUid);
                 if ($appData['APP_DRIVE_FOLDER_UID'] == null) {
                     $process = new \Process();
                     $process->setProUid($appData['PRO_UID']);
                     $result = $pmDrive->createFolder($process->getProTitle() . ' - ' . G::LoadTranslation("ID_CASE") . ' #' . $appData['APP_NUMBER'], $pmDrive->getFolderIdPMDrive($userUid));
                     $appData['APP_DRIVE_FOLDER_UID'] = $result->id;
                     $app->update($appData);
                 }
                 $fileIdDriveDoc = '';
                 $fileIdDrivePdf = '';
                 $sFilenameOriginal = preg_replace('[^A-Za-z0-9_]', '_', \G::replaceDataField($aOD['OUT_DOC_FILENAME'], $Fields['APP_DATA']));
                 switch ($aOD['OUT_DOC_GENERATE']) {
                     case "BOTH":
                         $result = $pmDrive->uploadFile('application/pdf', $pathOutput . $sFilename . '.pdf', $sFilenameOriginal . '.pdf', $appData['APP_DRIVE_FOLDER_UID']);
                         $oAppDocument->setDriveDownload('OUTPUT_PDF', $result->webContentLink);
                         $fileIdDrivePdf = $result->id;
                         $result = $pmDrive->uploadFile('application/doc', $pathOutput . $sFilename . '.doc', $sFilenameOriginal . '.doc', $appData['APP_DRIVE_FOLDER_UID']);
                         $oAppDocument->setDriveDownload('OUTPUT_DOC', $result->webContentLink);
                         $fileIdDriveDoc = $result->id;
                         break;
                     case "PDF":
                         $result = $pmDrive->uploadFile('application/pdf', $pathOutput . $sFilename . '.pdf', $sFilenameOriginal . '.pdf', $appData['APP_DRIVE_FOLDER_UID']);
                         $oAppDocument->setDriveDownload('OUTPUT_PDF', $result->webContentLink);
                         $fileIdDrivePdf = $result->id;
                         break;
                     case "DOC":
                         $result = $pmDrive->uploadFile('application/doc', $pathOutput . $sFilename . '.doc', $sFilenameOriginal . '.doc', $appData['APP_DRIVE_FOLDER_UID']);
                         $oAppDocument->setDriveDownload('OUTPUT_DOC', $result->webContentLink);
                         $fileIdDriveDoc = $result->id;
                         break;
                 }
                 $aFields['DOC_VERSION'] = $oAppDocument->getDocVersion();
                 // $docVersion;
                 $aFields['APP_DOC_UID'] = $oAppDocument->getAppDocUid();
                 //$appDocUid;
                 $appDocUid = $aFields['APP_DOC_UID'];
                 $oAppDocument->update($aFields);
                 //$option = 'pmDrive';
                 //add permissions
                 $criteria = new \Criteria('workflow');
                 $criteria->addSelectColumn(\ApplicationPeer::PRO_UID);
                 $criteria->addSelectColumn(\TaskUserPeer::TAS_UID);
                 $criteria->addSelectColumn(\TaskUserPeer::USR_UID);
                 $criteria->addSelectColumn(\TaskUserPeer::TU_RELATION);
                 $criteria->add(\ApplicationPeer::APP_UID, $applicationUid);
                 $criteria->addJoin(\ApplicationPeer::PRO_UID, \TaskPeer::PRO_UID, \Criteria::LEFT_JOIN);
                 $criteria->addJoin(\TaskPeer::TAS_UID, \TaskUserPeer::TAS_UID, \Criteria::LEFT_JOIN);
开发者ID:emildev35,项目名称:processmaker,代码行数:67,代码来源:OutputDocument.php

示例2: PMDrive

 $pmDrive = new PMDrive();
 if ($pmDrive->getStatusService()) {
     $app = new Application();
     $user = new Users();
     $dataUser = $user->load($_SESSION['USER_LOGGED']);
     $pmDrive->setDriveUser($dataUser['USR_EMAIL']);
     $appData = $app->Load($_SESSION['APPLICATION']);
     if ($appData['APP_DRIVE_FOLDER_UID'] == null) {
         $process = new Process();
         $process->setProUid($appData['PRO_UID']);
         $result = $pmDrive->createFolder($process->getProTitle() . ' - ' . G::LoadTranslation("ID_CASE") . ' #' . $appData['APP_NUMBER'], $pmDrive->getFolderIdPMDrive($_SESSION['USER_LOGGED']));
         $appData['APP_DRIVE_FOLDER_UID'] = $result->id;
         $app->update($appData);
     }
     $result = $pmDrive->uploadFile('application/' . $sExtension, $arrayFileTmpName[$i], $arrayFileName[$i], $appData['APP_DRIVE_FOLDER_UID']);
     $oAppDocument->setDriveDownload('ATTACHED', $result->webContentLink);
     $fileIdDrive = $result->id;
     $aFields['DOC_VERSION'] = $iDocVersion;
     $aFields['APP_DOC_UID'] = $sAppDocUid;
     $oAppDocument->update($aFields);
     //add permissions
     $criteria = new Criteria('workflow');
     $criteria->addSelectColumn(ApplicationPeer::PRO_UID);
     $criteria->addSelectColumn(TaskUserPeer::TAS_UID);
     $criteria->addSelectColumn(TaskUserPeer::USR_UID);
     $criteria->addSelectColumn(TaskUserPeer::TU_RELATION);
     $criteria->add(ApplicationPeer::APP_UID, $_SESSION['APPLICATION']);
     $criteria->addJoin(ApplicationPeer::PRO_UID, TaskPeer::PRO_UID, Criteria::LEFT_JOIN);
     $criteria->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
     $dataset = TaskUserPeer::doSelectRs($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_SaveData.php

示例3: Process

 $pmDrive->setDriveUser($dataUser['USR_EMAIL']);
 $applicationUid = $_SESSION['APPLICATION'];
 $appData = $app->Load($applicationUid);
 if ($appData['APP_DRIVE_FOLDER_UID'] == null) {
     $process = new Process();
     $process->setProUid($appData['PRO_UID']);
     $result = $pmDrive->createFolder($process->getProTitle() . ' - ' . G::LoadTranslation("ID_CASE") . ' #' . $appData['APP_NUMBER'], $pmDrive->getFolderIdPMDrive($_SESSION['USER_LOGGED']));
     $appData['APP_DRIVE_FOLDER_UID'] = $result->id;
     $app->update($appData);
 }
 $fileIdDriveDoc = '';
 $fileIdDrivePdf = '';
 switch ($aOD['OUT_DOC_GENERATE']) {
     case "BOTH":
         $result = $pmDrive->uploadFile('application/pdf', $pathOutput . $sFilename . '.pdf', $sFilenameOriginal . '.pdf', $appData['APP_DRIVE_FOLDER_UID']);
         $oAppDocument->setDriveDownload('OUTPUT_PDF', $result->webContentLink);
         $fileIdDrivePdf = $result->id;
         $result = $pmDrive->uploadFile('application/doc', $pathOutput . $sFilename . '.doc', $sFilenameOriginal . '.doc', $appData['APP_DRIVE_FOLDER_UID']);
         $oAppDocument->setDriveDownload('OUTPUT_DOC', $result->webContentLink);
         $fileIdDriveDoc = $result->id;
         break;
     case "PDF":
         $result = $pmDrive->uploadFile('application/pdf', $pathOutput . $sFilename . '.pdf', $sFilenameOriginal . '.pdf', $appData['APP_DRIVE_FOLDER_UID']);
         $oAppDocument->setDriveDownload('OUTPUT_PDF', $result->webContentLink);
         $fileIdDrivePdf = $result->id;
         break;
     case "DOC":
         $result = $pmDrive->uploadFile('application/doc', $pathOutput . $sFilename . '.doc', $sFilenameOriginal . '.doc', $appData['APP_DRIVE_FOLDER_UID']);
         $oAppDocument->setDriveDownload('OUTPUT_DOC', $result->webContentLink);
         $fileIdDriveDoc = $result->id;
         break;
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_Step.php


注:本文中的AppDocument::setDriveDownload方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。