本文整理匯總了PHP中Workflow::getByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Workflow::getByID方法的具體用法?PHP Workflow::getByID怎麽用?PHP Workflow::getByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Workflow
的用法示例。
在下文中一共展示了Workflow::getByID方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getWorkflowObject
/**
* Gets the Workflow object attached to this WorkflowProgress object
* @return Workflow
*/
public function getWorkflowObject()
{
if ($this->wfID > 0) {
$wf = Workflow::getByID($this->wfID);
} else {
$wf = new EmptyWorkflow();
}
return $wf;
}
示例2: getList
public static function getList() {
$workflows = array();
$db = Loader::db();
$r = $db->Execute("select wfID from Workflows order by wfName asc");
while ($row = $r->FetchRow()) {
$wf = Workflow::getByID($row['wfID']);
if (is_object($wf)) {
$workflows[] = $wf;
}
}
return $workflows;
}
示例3: view_detail
public function view_detail($wfID = false, $message = false)
{
$wf = Workflow::getByID($wfID);
if (!is_object($wf)) {
$this->redirect("/dashboard/workflow/list");
}
switch ($message) {
case 'workflow_created':
$this->set('message', t('Workflow created successfully. You may now modify its properties.'));
break;
case 'workflow_updated':
$this->set('message', t('Workflow updated.'));
break;
}
$this->set('wf', $wf);
}
示例4: getWorkflows
public function getWorkflows() {
$db = Loader::db();
$r = $db->Execute('select wfID from PermissionAccessWorkflows where paID = ?', array($this->getPermissionAccessID()));
$workflows = array();
while ($row = $r->FetchRow()) {
$wf = Workflow::getByID($row['wfID']);
if (is_object($wf)) {
$workflows[] = $wf;
}
}
return $workflows;
}
示例5: array
Loader::element('permission/labels', array('pk' => $pk, 'pa' => $pa));
}
if ($_REQUEST['task'] == 'save_permission_assignments' && Loader::helper("validation/token")->validate('save_permission_assignments')) {
$permissions = PermissionKey::getList('file');
foreach ($permissions as $pk) {
$paID = $_POST['pkID'][$pk->getPermissionKeyID()];
$pk->setPermissionObject($f);
$pt = $pk->getPermissionAssignmentObject();
$pt->clearPermissionAssignment();
if ($paID > 0) {
$pa = PermissionAccess::getByID($paID, $pk);
if (is_object($pa)) {
$pt->assignPermissionAccess($pa);
}
}
}
}
if ($_REQUEST['task'] == 'save_workflows' && Loader::helper("validation/token")->validate('save_workflows')) {
$pk = PermissionKey::getByID($_REQUEST['pkID']);
$pk->setPermissionObject($f);
$pa = PermissionAccess::getByID($_REQUEST['paID'], $pk);
$pk->clearWorkflows();
foreach ($_POST['wfID'] as $wfID) {
$wf = Workflow::getByID($wfID);
if (is_object($wf)) {
$pk->attachWorkflow($wf);
}
}
}
}
}
示例6: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$p = Page::getByPath('/dashboard/system/permissions/workflows');
$cp = new Permissions($p);
if ($cp->canViewPage()) {
$workflow = Workflow::getByID($_REQUEST['wfID']);
Loader::element('permission/details/basic_workflow', array('workflow' => $workflow));
}