You are here

function hosting_task_status_class in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 task/hosting_task.module \hosting_task_status_class()
  2. 7.3 task/hosting_task.module \hosting_task_status_class()
4 calls to hosting_task_status_class()
hosting_task_fetch_tasks in task/hosting_task.module
hosting_task_handler_field_hosting_task_status::render in task/hosting_task_handler_field_hosting_task_status.inc
hosting_task_queue_block in task/hosting_task.module
Hosting task list queue block
_hosting_task_list in task/hosting_task.module
Theme a task list

File

task/hosting_task.module, line 1247
Web server node type is defined here.

Code

function hosting_task_status_class($status = null) {
  $class = null;
  if (!is_null($status)) {
    switch ($status) {
      case HOSTING_TASK_SUCCESS:
        $class = 'hosting-success';
        break;
      case HOSTING_TASK_ERROR:
        $class = 'hosting-error';
        break;
      case HOSTING_TASK_QUEUED:
        $class = 'hosting-queue';
        break;
      case HOSTING_TASK_PROCESSING:
        $class = 'hosting-processing';
        break;
      case HOSTING_TASK_WARNING:
        $class = 'hosting-warning';
        break;
    }
  }
  return $class;
}