本文整理汇总了PHP中InputDocument::InputExists方法的典型用法代码示例。如果您正苦于以下问题:PHP InputDocument::InputExists方法的具体用法?PHP InputDocument::InputExists怎么用?PHP InputDocument::InputExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputDocument
的用法示例。
在下文中一共展示了InputDocument::InputExists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCompleteDocumentInfo
//.........这里部分代码省略.........
case "PDF":
$downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=pdf" . "&random=" . rand();
$downloadLink1 = "";
$downloadLabel = ".pdf";
$downloadLabel1 = "";
break;
case "DOC":
$downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=doc" . "&random=" . rand();
$downloadLink1 = "";
$downloadLabel = ".doc";
$downloadLabel1 = "";
break;
case "BOTH":
$downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=pdf" . "&random=" . rand();
$downloadLink1 = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=doc" . "&random=" . rand();
$downloadLabel = ".pdf";
$downloadLabel1 = ".doc";
break;
case "NOFILE":
$downloadLink = "../cases/cases_ShowDocument?a=" . $appDocUid . "&v=" . $docVersion;
$downloadLink1 = "";
$downloadLabel = G::LoadTranslation("ID_DOWNLOAD");
$downloadLabel1 = "";
break;
}
if ($swOutDocExists == 0) {
$row4 = array();
}
break;
case "INPUT":
$oInputDocument = new InputDocument();
if ($docUid != - 1) {
if ($oInputDocument->InputExists( $docUid )) {
$row4 = $oInputDocument->load( $docUid );
$versioningEnabled = $row4['INP_DOC_VERSIONING'];
} else {
$row4 = array ();
$versioningEnabled = false;
}
$downloadLink = "../cases/cases_ShowDocument?a=" . $appDocUid . "&v=" . $docVersion;
$downloadLink1 = "";
$downloadLabel = G::LoadTranslation( 'ID_DOWNLOAD' );
$downloadLabel1 = "";
} else {
$row4 = array ();
$versioningEnabled = false;
$downloadLink = "../cases/cases_ShowDocument?a=" . $appDocUid . "&v=" . $docVersion;
$downloadLink1 = "";
$downloadLabel = G::LoadTranslation( 'ID_DOWNLOAD' );
$downloadLabel1 = "";
}
if (! empty( $row1["APP_DOC_PLUGIN"] )) {
$pluginRegistry = &PMPluginRegistry::getSingleton();
$pluginName = $row1["APP_DOC_PLUGIN"];
$fieldValue = "";
if (file_exists( PATH_PLUGINS . $pluginName . ".php" )) {
$pluginDetail = $pluginRegistry->getPluginDetails( $pluginName . ".php" );
if ($pluginDetail) {
if ($pluginDetail->enabled) {
require_once (PATH_PLUGINS . $pluginName . ".php");
$pluginNameClass = $pluginName . "Plugin";
$objPluginClass = new $pluginNameClass( $pluginName );
示例2: removeProcessRows
//.........这里部分代码省略.........
foreach (glob( $sWildcard ) as $fn) {
@unlink( $fn );
}
if ($oDynaform->dynaformExists( $aRow['DYN_UID'] )) {
$oDynaform->remove( $aRow['DYN_UID'] );
}
$oDataset->next();
}
//Delete the input documents of process
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( InputDocumentPeer::PRO_UID, $sProUid );
$oDataset = InputDocumentPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
if ($oInputDocument->InputExists( $aRow['INP_DOC_UID'] )) {
$oInputDocument->remove( $aRow['INP_DOC_UID'] );
}
$oDataset->next();
}
//Delete the output documents of process
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( OutputDocumentPeer::PRO_UID, $sProUid );
$oDataset = OutputDocumentPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
if ($oOutputDocument->OutputExists( $aRow['OUT_DOC_UID'] )) {
$oOutputDocument->remove( $aRow['OUT_DOC_UID'] );
}
$oDataset->next();
示例3: existsObjectUid
/**
* Verify if exists the "Object UID" in the corresponding table
*
* @param string $type Type of Step (DYNAFORM, INPUT_DOCUMENT, OUTPUT_DOCUMENT)
* @param string $objectUid Unique id of Object
* @param string $fieldNameForException Field name for the exception
*
* return strin Return empty string if $objectUid exists in the corresponding table, return string with data if $objectUid doesn't exist
*/
public function existsObjectUid($type, $objectUid, $fieldNameForException)
{
try {
$msg = "";
switch ($type) {
case "DYNAFORM":
$dynaform = new \Dynaform();
if (!$dynaform->dynaformExists($objectUid)) {
$msg = \G::LoadTranslation("ID_DYNAFORM_DOES_NOT_EXIST", array($fieldNameForException, $objectUid));
}
break;
case "INPUT_DOCUMENT":
$inputdoc = new \InputDocument();
if (!$inputdoc->InputExists($objectUid)) {
$msg = \G::LoadTranslation("ID_INPUT_DOCUMENT_DOES_NOT_EXIST", array($fieldNameForException, $objectUid));
}
break;
case "OUTPUT_DOCUMENT":
$outputdoc = new \OutputDocument();
if (!$outputdoc->OutputExists($objectUid)) {
$msg = \G::LoadTranslation("ID_OUTPUT_DOCUMENT_DOES_NOT_EXIST", array($fieldNameForException, $objectUid));
}
break;
}
return $msg;
} catch (\Exception $e) {
throw $e;
}
}