You are here

function theme_mostpopular_service_status in Drupal Most Popular 7

Same name and namespace in other branches
  1. 6 mostpopular.admin.inc \theme_mostpopular_service_status()

Themes the status of a service.

Parameters

array An array containing::

  • status: The status of the service as an integer.
1 theme call to theme_mostpopular_service_status()
mostpopular_services_admin_form in ./mostpopular.services.inc
Renders a form for configuring the blocks and services.

File

./mostpopular.services.inc, line 288
Provides an admin GUI for configuring services.

Code

function theme_mostpopular_service_status($variables) {
  $status = $variables['status'];
  $out = "<span class='mostpopular--service-status mostpopular--service-status-{$status}'>";
  switch ($status) {
    case MOSTPOPULAR_SERVICE_STATUS_OK:
      $out .= t('OK');
      break;
    case MOSTPOPULAR_SERVICE_STATUS_CONFIGURED:
      $out .= t('Configured');
      break;
    case MOSTPOPULAR_SERVICE_STATUS_PENDING:
      $out .= t('Pending');
      break;
    case MOSTPOPULAR_SERVICE_STATUS_ERROR:
      $out .= t('Error');
      break;
    default:
      $out .= '&nbsp;';
  }
  $out .= "</span>";
  return $out;
}