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


PHP Workflow::getWorkflowID方法代码示例

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


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

示例1: enterNewWorkflow

 public function enterNewWorkflow()
 {
     $config = new Configuration();
     //remove any current workflow steps
     $this->removeResourceSteps();
     //make sure this resource is marked in progress in case it was archived
     $status = new Status();
     $this->statusID = $status->getIDFromName('progress');
     $this->save();
     //Determine the workflow this resource belongs to
     $workflowObj = new Workflow();
     $workflowID = $workflowObj->getWorkflowID($this->resourceTypeID, $this->resourceFormatID, $this->acquisitionTypeID);
     if ($workflowID) {
         $workflow = new Workflow(new NamedArguments(array('primaryKey' => $workflowID)));
         //Copy all of the step attributes for this workflow to a new resource step
         foreach ($workflow->getSteps() as $step) {
             $resourceStep = new ResourceStep();
             $resourceStep->resourceStepID = '';
             $resourceStep->resourceID = $this->resourceID;
             $resourceStep->stepID = $step->stepID;
             $resourceStep->priorStepID = $step->priorStepID;
             $resourceStep->stepName = $step->stepName;
             $resourceStep->userGroupID = $step->userGroupID;
             $resourceStep->displayOrderSequence = $step->displayOrderSequence;
             $resourceStep->save();
         }
         //Start the first step
         //this handles updating the db and sending notifications for approval groups
         foreach ($this->getFirstSteps() as $resourceStep) {
             $resourceStep->startStep();
         }
     }
     //send an email notification to the feedback email address and the creator
     $cUser = new User(new NamedArguments(array('primaryKey' => $this->createLoginID)));
     $acquisitionType = new AcquisitionType(new NamedArguments(array('primaryKey' => $this->acquisitionTypeID)));
     if ($cUser->firstName) {
         $creator = $cUser->firstName . " " . $cUser->lastName;
     } else {
         if ($this->createLoginID) {
             //for some reason user isn't set up or their firstname/last name don't exist
             $creator = $this->createLoginID;
         } else {
             $creator = "(unknown user)";
         }
     }
     if ($config->settings->feedbackEmailAddress || $cUser->emailAddress) {
         $email = new Email();
         $util = new Utility();
         $email->message = $util->createMessageFromTemplate('NewResourceMain', $this->resourceID, $this->titleText, '', '', $creator);
         if ($cUser->emailAddress) {
             $emailTo[] = $cUser->emailAddress;
         }
         if ($config->settings->feedbackEmailAddress != '') {
             $emailTo[] = $config->settings->feedbackEmailAddress;
         }
         $email->to = implode(",", $emailTo);
         if ($acquisitionType->shortName) {
             $email->subject = "CORAL Alert: New " . $acquisitionType->shortName . " Resource Added: " . $this->titleText;
         } else {
             $email->subject = "CORAL Alert: New Resource Added: " . $this->titleText;
         }
         $email->send();
     }
 }
开发者ID:brandon-garcia,项目名称:resources,代码行数:64,代码来源:Resource.php

示例2: attachWorkflow

	public function attachWorkflow(Workflow $wf) {
		$db = Loader::db();
		$db->Replace('PermissionAccessWorkflows', array('paID' => $this->getPermissionAccessID(), 'wfID' => $wf->getWorkflowID()), array('paID', 'wfID'), true);
	}	
开发者ID:nveid,项目名称:concrete5,代码行数:4,代码来源:model.php

示例3: add

 /** 
  * Creates a WorkflowProgress object (which will be assigned to a Page, File, etc... in our system.
  */
 public static function add($wpCategoryHandle, Workflow $wf, WorkflowRequest $wr)
 {
     $db = Loader::db();
     $wpDateAdded = Loader::helper('date')->getLocalDateTime();
     $wpCategoryID = $db->GetOne('select wpCategoryID from WorkflowProgressCategories where wpCategoryHandle = ?', array($wpCategoryHandle));
     $db->Execute('insert into WorkflowProgress (wfID, wrID, wpDateAdded, wpCategoryID) values (?, ?, ?, ?)', array($wf->getWorkflowID(), $wr->getWorkflowRequestID(), $wpDateAdded, $wpCategoryID));
     $wp = self::getByID($db->Insert_ID());
     $wp->addWorkflowProgressHistoryObject($wr);
     return $wp;
 }
开发者ID:ronlobo,项目名称:concrete5-de,代码行数:13,代码来源:model.php


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