本文整理汇总了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));
}