Updates the status of the task.
int $status: The new status of the task. Has to be one of the task status constants.
string $message: (Optional) The log message to be saved along with the status change.
array $variables: (Optional) An array of variables to replace in the message on display.
string $type: (optional) The message type.
int The updated status of the task if it could be set.
Overrides LocalTaskInterface::setStatus
public function setStatus($status, $message = NULL, $variables = array(), $type = 'debug') {
// Return TRUE if the status could be set. Return FALSE otherwise.
if (array_key_exists($status, $this
->getStatuses())) {
$this
->incrementLoopCount($status, $this->tuid->target_id);
$this->status = $status;
$this
->save();
}
return $this->status;
}