Increment loop_count property.
Does it depending on current status, new status and new assignee.
int $new_status: New status of task.
int $new_tuid: New translator uid.
Overrides LocalTaskInterface::incrementLoopCount
public function incrementLoopCount($new_status, $new_tuid) {
if ($this
->getStatus() == static::STATUS_PENDING && $new_status == static::STATUS_PENDING && $this->tuid->target_id != $new_tuid) {
++$this->loop_count->value;
}
else {
if ($this
->getStatus() != static::STATUS_UNASSIGNED && $new_status == static::STATUS_UNASSIGNED) {
++$this->loop_count->value;
}
else {
if ($this
->getStatus() != static::STATUS_UNASSIGNED && $this
->getStatus() != static::STATUS_PENDING && $new_status == static::STATUS_PENDING) {
++$this->loop_count->value;
}
}
}
}