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


PHP InputDocument::InputExists方法代码示例

本文整理汇总了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 );
开发者ID:rrsc,项目名称:processmaker,代码行数:67,代码来源:AppFolder.php

示例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();
开发者ID:rrsc,项目名称:processmaker,代码行数:67,代码来源:class.processes.php

示例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;
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:43,代码来源:Step.php


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