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


PHP UserListFactory::getFullNameById方法代码示例

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


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

示例1: postSave

 function postSave()
 {
     if ($this->getEnableTimeSheetVerificationCheck()) {
         //Check to see if schedule is verified, if so unverify it on modified punch.
         //Make sure exceptions are calculated *after* this so TimeSheet Not Verified exceptions can be triggered again.
         if (is_object($this->getUserDateObject()) and is_object($this->getUserDateObject()->getPayPeriodObject()) and is_object($this->getUserDateObject()->getPayPeriodObject()->getPayPeriodScheduleObject()) and $this->getUserDateObject()->getPayPeriodObject()->getPayPeriodScheduleObject()->getTimeSheetVerifyType() != 10) {
             //Find out if timesheet is verified or not.
             $pptsvlf = TTnew('PayPeriodTimeSheetVerifyListFactory');
             $pptsvlf->getByPayPeriodIdAndUserId($this->getUserDateObject()->getPayPeriod(), $this->getUserDateObject()->getUser());
             if ($pptsvlf->getRecordCount() > 0) {
                 //Pay period is verified, delete all records and make log entry.
                 //These can be added during the maintenance jobs, so the audit records are recorded as user_id=0, check those first.
                 Debug::text('Pay Period is verified, deleting verification records: ' . $pptsvlf->getRecordCount() . ' User ID: ' . $this->getUserDateObject()->getUser() . ' Pay Period ID: ' . $this->getUserDateObject()->getPayPeriod(), __FILE__, __LINE__, __METHOD__, 10);
                 foreach ($pptsvlf as $pptsv_obj) {
                     TTLog::addEntry($pptsv_obj->getId(), 500, TTi18n::getText('Schedule Modified After Verification') . ': ' . UserListFactory::getFullNameById($this->getUserDateObject()->getUser()) . ' ' . TTi18n::getText('Schedule') . ': ' . TTDate::getDate('DATE', $this->getStartTime()), NULL, $pptsvlf->getTable());
                     $pptsv_obj->setDeleted(TRUE);
                     if ($pptsv_obj->isValid()) {
                         $pptsv_obj->Save();
                     }
                 }
             }
         }
     }
     if ($this->getEnableReCalculateDay() == TRUE) {
         //Calculate total time. Mainly for docked.
         //Calculate entire week as Over Schedule (Weekly) OT policy needs to be reapplied if the schedule changes.
         if (is_object($this->getUserDateObject()) and $this->getUserDateObject()->getUser() > 0) {
             //When shifts are assigned to different days, we need to calculate both days the schedule touches, as the shift could be assigned to either of them.
             UserDateTotalFactory::smartReCalculate($this->getUserDateObject()->getUser(), array($this->getUserDateID(), $this->getOldUserDateID(), UserDateFactory::findOrInsertUserDate($this->getUserDateObject()->getUser(), $this->getStartTime()), UserDateFactory::findOrInsertUserDate($this->getUserDateObject()->getUser(), $this->getEndTime())), TRUE, FALSE);
         }
     }
     return TRUE;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:33,代码来源:ScheduleFactory.class.php

示例2: addLog

 function addLog($log_action)
 {
     //Don't do detail logging for this, as it will store entire figerprints in the log table.
     return TTLog::addEntry($this->getId(), $log_action, TTi18n::getText('Employee Identification - Employee') . ': ' . UserListFactory::getFullNameById($this->getUser()) . ' ' . TTi18n::getText('Type') . ': ' . Option::getByKey($this->getType(), $this->getOptions('type')), NULL, $this->getTable());
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:5,代码来源:UserIdentificationFactory.class.php

示例3: StationListFactory

         if ($plf->getRecordCount() > 0) {
             $p_obj = $plf->getCurrent();
         } else {
             $punch_data = NULL;
         }
         //Get Station data.
         $station_data = FALSE;
         $slf = new StationListFactory();
         if ($p_obj->getStation() != FALSE) {
             $slf->getById($p_obj->getStation());
             if ($slf->getRecordCount() > 0) {
                 $s_obj = $slf->getCurrent();
                 $station_data = array('id' => $s_obj->getId(), 'type_id' => $s_obj->getType(), 'type' => Option::getByKey($s_obj->getType(), $s_obj->getOptions('type')), 'station_id' => $s_obj->getStation(), 'source' => $s_obj->getSource(), 'description' => Misc::TruncateString($s_obj->getDescription(), 20));
             }
         }
         $pc_data = array('id' => $pc_obj->getId(), 'user_date_id' => $pc_obj->getUserDateId(), 'user_id' => $pc_obj->getUserDateObject()->getUser(), 'user_full_name' => $pc_obj->getUserDateObject()->getUserObject()->getFullName(), 'pay_period_id' => $pc_obj->getUserDateObject()->getPayPeriod(), 'branch_id' => $pc_obj->getBranch(), 'department_id' => $pc_obj->getDepartment(), 'job_id' => $pc_obj->getJob(), 'job_item_id' => $pc_obj->getJobItem(), 'quantity' => (double) $pc_obj->getQuantity(), 'bad_quantity' => (double) $pc_obj->getBadQuantity(), 'note' => $pc_obj->getNote(), 'other_id1' => $pc_obj->getOtherID1(), 'other_id2' => $pc_obj->getOtherID2(), 'other_id3' => $pc_obj->getOtherID3(), 'other_id4' => $pc_obj->getOtherID4(), 'other_id5' => $pc_obj->getOtherID5(), 'punch_id' => $p_obj->getId(), 'status_id' => $p_obj->getStatus(), 'type_id' => $p_obj->getType(), 'station_id' => $p_obj->getStation(), 'station_data' => $station_data, 'time_stamp' => $p_obj->getTimeStamp(), 'date_stamp' => $p_obj->getTimeStamp(), 'original_time_stamp' => $p_obj->getOriginalTimeStamp(), 'actual_time_stamp' => $p_obj->getActualTimeStamp(), 'longitude' => $p_obj->getLongitude(), 'latitude' => $p_obj->getLatitude(), 'created_date' => $p_obj->getCreatedDate(), 'created_by' => $p_obj->getCreatedBy(), 'created_by_name' => (string) $ulf->getFullNameById($p_obj->getCreatedBy()), 'updated_date' => $p_obj->getUpdatedDate(), 'updated_by' => $p_obj->getUpdatedBy(), 'updated_by_name' => (string) $ulf->getFullNameById($p_obj->getUpdatedBy()), 'deleted_date' => $p_obj->getDeletedDate(), 'deleted_by' => $p_obj->getDeletedBy());
     }
 } elseif ($action != 'submit') {
     Debug::Text(' ID was NOT passed: ' . $id, __FILE__, __LINE__, __METHOD__, 10);
     //UserID has to be set at minimum
     if ($punch_control_id != '') {
         Debug::Text(' Punch Control ID was passed: ' . $punch_control_id, __FILE__, __LINE__, __METHOD__, 10);
         //Get previous punch, and default timestamp to that.
         $plf = new PunchListFactory();
         $plf->getPreviousPunchByPunchControlID($punch_control_id);
         if ($plf->getRecordCount() > 0) {
             $prev_punch_obj = $plf->getCurrent();
             $time_stamp = $prev_punch_obj->getTimeStamp() + 3600;
             $date_stamp = $prev_punch_obj->getTimeStamp();
             //Match date with previous punch as well, incase a new day hasnt been triggered yet.
         } else {
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditPunch.php

示例4: preSave

 function preSave()
 {
     if ($this->getPunchControlID() === FALSE) {
         $this->setPunchControlID(0);
     }
     if ($this->getOverTimePolicyID() === FALSE) {
         $this->setOverTimePolicyId(0);
     }
     if ($this->getAbsencePolicyID() === FALSE) {
         $this->setAbsencePolicyID(0);
     }
     if ($this->getPremiumPolicyID() === FALSE) {
         $this->setPremiumPolicyId(0);
     }
     if ($this->getMealPolicyID() === FALSE) {
         $this->setMealPolicyId(0);
     }
     if ($this->getBranch() === FALSE) {
         $this->setBranch(0);
     }
     if ($this->getDepartment() === FALSE) {
         $this->setDepartment(0);
     }
     if ($this->getJob() === FALSE) {
         $this->setJob(0);
     }
     if ($this->getJobItem() === FALSE) {
         $this->setJobItem(0);
     }
     if ($this->getQuantity() === FALSE) {
         $this->setQuantity(0);
     }
     if ($this->getBadQuantity() === FALSE) {
         $this->setBadQuantity(0);
     }
     if ($this->getEnableTimeSheetVerificationCheck()) {
         //Check to see if timesheet is verified, if so unverify it on modified punch.
         //Make sure exceptions are calculated *after* this so TimeSheet Not Verified exceptions can be triggered again.
         if (is_object($this->getUserDateObject()) and is_object($this->getUserDateObject()->getPayPeriodObject()) and is_object($this->getUserDateObject()->getPayPeriodObject()->getPayPeriodScheduleObject()) and $this->getUserDateObject()->getPayPeriodObject()->getPayPeriodScheduleObject()->getTimeSheetVerifyType() != 10) {
             //Find out if timesheet is verified or not.
             $pptsvlf = TTnew('PayPeriodTimeSheetVerifyListFactory');
             $pptsvlf->getByPayPeriodIdAndUserId($this->getUserDateObject()->getPayPeriod(), $this->getUserDateObject()->getUser());
             if ($pptsvlf->getRecordCount() > 0) {
                 //Pay period is verified, delete all records and make log entry.
                 //These can be added during the maintenance jobs, so the audit records are recorded as user_id=0, check those first.
                 Debug::text('Pay Period is verified, deleting verification records: ' . $pptsvlf->getRecordCount(), __FILE__, __LINE__, __METHOD__, 10);
                 foreach ($pptsvlf as $pptsv_obj) {
                     if (is_object($this->getAbsencePolicyObject())) {
                         TTLog::addEntry($pptsv_obj->getId(), 500, TTi18n::getText('TimeSheet Modified After Verification') . ': ' . UserListFactory::getFullNameById($this->getUserDateObject()->getUser()) . ' ' . TTi18n::getText('Absence') . ': ' . $this->getAbsencePolicyObject()->getName() . ' - ' . TTDate::getDate('DATE', $this->getUserDateObject()->getDateStamp()), NULL, $pptsvlf->getTable());
                     }
                     $pptsv_obj->setDeleted(TRUE);
                     if ($pptsv_obj->isValid()) {
                         $pptsv_obj->Save();
                     }
                 }
             }
         }
     }
     return TRUE;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:60,代码来源:UserDateTotalFactory.class.php

示例5: addLog

 function addLog($log_action)
 {
     //Should the object_id be the pay period ID instead, that way its easier to find the audit logs?
     if (is_object($this->getPayPeriodObject())) {
         return TTLog::addEntry($this->getId(), $log_action, TTi18n::getText('TimeSheet Verify') . ' - ' . TTi18n::getText('Employee') . ': ' . UserListFactory::getFullNameById($this->getUser()) . ' ' . TTi18n::getText('Pay Period') . ': ' . TTDate::getDate('DATE', $this->getPayPeriodObject()->getStartDate()) . ' -> ' . TTDate::getDate('DATE', $this->getPayPeriodObject()->getEndDate()), NULL, $this->getTable());
     }
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:7,代码来源:PayPeriodTimeSheetVerifyFactory.class.php

示例6: addLog

 function addLog($log_action)
 {
     return TTLog::addEntry($this->getId(), $log_action, TTi18n::getText('Pay Stub Amendment - Employee') . ': ' . UserListFactory::getFullNameById($this->getUser()) . ' ' . TTi18n::getText('Amount') . ': ' . $this->getAmount(), NULL, $this->getTable(), $this);
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:4,代码来源:PayStubAmendmentFactory.class.php

示例7: addLog

 function addLog($log_action)
 {
     return TTLog::addEntry($this->getId(), $log_action, TTi18n::getText('Punch Control - Employee') . ': ' . UserListFactory::getFullNameById($this->getUser()), NULL, $this->getTable(), $this);
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:4,代码来源:PunchControlFactory.class.php

示例8: addLog

 function addLog($log_action)
 {
     return TTLog::addEntry($this->getId(), $log_action, TTi18n::getText('Punch - Employee') . ': ' . UserListFactory::getFullNameById($this->getUser()) . ' ' . TTi18n::getText('Timestamp') . ': ' . TTDate::getDate('DATE+TIME', $this->getTimeStamp()), NULL, $this->getTable(), $this);
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:4,代码来源:PunchFactory.class.php


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