本文整理汇总了PHP中Department::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP Department::Load方法的具体用法?PHP Department::Load怎么用?PHP Department::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Department
的用法示例。
在下文中一共展示了Department::Load方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: departmentList
/**
* get all department
*
* @param none
* @return $result will return an object
*/
public function departmentList ()
{
try {
$result = array ();
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( DepartmentPeer::DEP_STATUS, 'ACTIVE' );
$oDataset = DepartmentPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oDepartment = new Department();
$aDepartment = $oDepartment->Load( $aRow['DEP_UID'] );
$node['guid'] = $aRow['DEP_UID'];
$node['name'] = $aDepartment['DEPO_TITLE'];
$node['parentUID'] = $aDepartment['DEP_PARENT'];
$node['dn'] = $aDepartment['DEP_LDAP_DN'];
//get the users from this department
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn( 'COUNT(*)' );
$c->add( UsersPeer::DEP_UID, $aRow['DEP_UID'] );
$rs = UsersPeer::doSelectRS( $c );
$rs->next();
$row = $rs->getRow();
$count = $row[0];
$node['users'] = $count;
$result[] = $node;
$oDataset->next();
}
return $result;
} catch (Exception $e) {
$result[] = array ('guid' => $e->getMessage(),'name' => $e->getMessage()
);
return $result;
}
}
示例2: switch
switch ($access) {
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
}
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
return $RBAC_Response;
}
$dept = new Department();
$DptoUid = isset($_GET['UID']) ? urldecode($_GET['UID']) : '';
if ($DptoUid) {
$aFields = $dept->Load($DptoUid);
} else {
$aFields = array();
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields, 'departments_Save');
G::RenderPage("publish", "raw");
示例3: Publisher
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
}
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
$G_PUBLISH = new Publisher();
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('departments/departmentUsers', false);
//adding a javascript file .js
$oHeadPublisher->addContent('departments/departmentUsers');
//adding a html file .html.
G::LoadClass('configuration');
$c = new Configurations();
$dep = new Department();
$dep->Load($_GET['dUID']);
$depart = array();
$depart['DEP_UID'] = $dep->getDepUid();
$depart['DEP_TITLE'] = $dep->getDepTitle();
$depart['DEP_MANAGER'] = $dep->getDepManager();
$oHeadPublisher->assign('DEPARTMENT', $depart);
$oHeadPublisher->assign('FORMATS', $c->getFormats());
G::RenderPage('publish', 'extJs');
示例4: Users
$oUser = new Users();
$data = $oUser->loadDetailed($_REQUEST['USR_UID']);
$data['USR_STATUS'] = G::LoadTranslation('ID_' . $data['USR_STATUS']);
$oAppCache = new AppCacheView();
$aTypes = array();
$aTypes['to_do'] = 'CASES_INBOX';
$aTypes['draft'] = 'CASES_DRAFT';
$aTypes['cancelled'] = 'CASES_CANCELLED';
$aTypes['sent'] = 'CASES_SENT';
$aTypes['paused'] = 'CASES_PAUSED';
$aTypes['completed'] = 'CASES_COMPLETED';
$aTypes['selfservice'] = 'CASES_SELFSERVICE';
$aCount = $oAppCache->getAllCounters(array_keys($aTypes), $_REQUEST['USR_UID']);
$dep = new Department();
if ($dep->existsDepartment($data['DEP_UID'])) {
$dep->Load($data['DEP_UID']);
$dep_name = $dep->getDepTitle();
} else {
$dep_name = '';
}
if ($data['USR_REPLACED_BY'] != '') {
$user = new Users();
$u = $user->load($data['USR_REPLACED_BY']);
$c = new Configurations();
$replaced_by = $c->usersNameFormat($u['USR_USERNAME'], $u['USR_FIRSTNAME'], $u['USR_LASTNAME']);
} else {
$replaced_by = '';
}
$misc = array();
$misc['DEP_TITLE'] = $dep_name;
$misc['REPLACED_NAME'] = $replaced_by;
示例5: Department
$dep = new Department();
$dep->Load($DEP_UID);
$dep_manager = $dep->getDepManager();
$manager = $dep_manager == '' ? true : false;
foreach ($aUsers as $USR_UID) {
$dep->addUserToDepartment($DEP_UID, $USR_UID, $manager, false);
$manager = false;
}
$dep->updateDepartmentManager($DEP_UID);
break;
case 'deleteDepartmentToUserMultiple':
$DEP_UID = $_REQUEST['DEP_UID'];
$uSERS = $_REQUEST['USR_UID'];
$aUsers = explode(',', $uSERS);
$dep = new Department();
$dep->Load($DEP_UID);
$manager = $dep->getDepManager();
foreach ($aUsers as $USR_UID) {
$dep->removeUserFromDepartment($DEP_UID, $USR_UID);
if ($USR_UID == $manager) {
$editDepto['DEP_UID'] = $DEP_UID;
$editDepto['DEP_MANAGER'] = '';
$dep->update($editDepto);
$dep->updateDepartmentManager($DEP_UID);
}
}
break;
case 'updateSupervisor':
$dep_manager = $_POST['USR_UID'];
$dep_uid = $_POST['DEP_UID'];
$editDepartment['DEP_UID'] = $dep_uid;
示例6: departmentRemoveUsers
public function departmentRemoveUsers($departmentUid, array $arrayUserUid)
{
try {
$department = new Department();
$department->Load($departmentUid);
$departmentManagerUid = $department->getDepManager();
foreach ($arrayUserUid as $value) {
$userUid = $value;
$department->removeUserFromDepartment($departmentUid, $userUid);
if ($userUid == $departmentManagerUid) {
$department->update(array("DEP_UID" => $departmentUid, "DEP_MANAGER" => ""));
$department->updateDepartmentManager($departmentUid);
}
}
} catch (Exception $e) {
throw $e;
}
}
示例7: DBConnection
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
}
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
return $RBAC_Response;
}
G::LoadClass('departments');
$dbc = new DBConnection();
$ses = new DBSession($dbc);
$Dpto = new Department();
$DptoUid = isset($_GET['SUID']) ? urldecode($_GET['SUID']) : '';
$DepParent = isset($_GET['SDEPPARENT']) ? urldecode($_GET['SDEPPARENT']) : '';
if (strlen($DptoUid) > 1 && strlen($DepParent) > 1) {
$aFields = $Dpto->Load($DptoUid);
} else {
$infosubDto = $Dpto->Load($DptoUid);
//print_r($infosubDto);
$aFields = array('SUID' => $DptoUid, 'SDEPPARENT' => $DepParent);
//print_r($aFields);print"<hr>";
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/subdep_Edit', '', $aFields, 'subdep_Save');
G::RenderPage("publish", "raw");