public function TMGMTLocalTask::incrementLoopCount in Translation Management Tool 7
Increment loop_count property depending on current status, new status and new translator.
Parameters
int $newStatus: New status of task.
int $new_tuid: New translator uid.
3 calls to TMGMTLocalTask::incrementLoopCount()
- TMGMTLocalTask::assign in translators/
tmgmt_local/ entity/ tmgmt_local.entity.task.inc - Assign translation task to passed user.
- TMGMTLocalTask::setStatus in translators/
tmgmt_local/ entity/ tmgmt_local.entity.task.inc - Updates the status of the task.
- TMGMTLocalTask::unassign in translators/
tmgmt_local/ entity/ tmgmt_local.entity.task.inc - Unassign translation task.
File
- translators/
tmgmt_local/ entity/ tmgmt_local.entity.task.inc, line 370
Class
- TMGMTLocalTask
- Entity class for the local task entity.
Code
public function incrementLoopCount($newStatus, $new_tuid) {
if ($this->status == TMGMT_LOCAL_TASK_STATUS_PENDING && $newStatus == TMGMT_LOCAL_TASK_STATUS_PENDING && $this->tuid != $new_tuid) {
++$this->loop_count;
}
else {
if ($this->status != TMGMT_LOCAL_TASK_STATUS_UNASSIGNED && $newStatus == TMGMT_LOCAL_TASK_STATUS_UNASSIGNED) {
++$this->loop_count;
}
else {
if ($this->status != TMGMT_LOCAL_TASK_STATUS_UNASSIGNED && $this->status != TMGMT_LOCAL_TASK_STATUS_PENDING && $newStatus == TMGMT_LOCAL_TASK_STATUS_PENDING) {
++$this->loop_count;
}
}
}
}