You are here

function theme_entityqueue_status in Entityqueue 7

Themes the exportable status of a queue.

1 theme call to theme_entityqueue_status()
theme_entityqueue_overview_item in includes/entityqueue.theme.inc
Returns the HTML used for a queue on the entityqueue overview listing.

File

includes/entityqueue.theme.inc, line 30
Contains theme implementations for the Entityqueue module.

Code

function theme_entityqueue_status($variables) {
  $status = $variables['status'];
  $html = $variables['html'];
  if (($status & (EXPORT_IN_CODE | EXPORT_IN_DATABASE)) == (EXPORT_IN_CODE | EXPORT_IN_DATABASE)) {
    $label = t('Database overriding code');
    $help = t('This configuration is provided by a module, but has been changed.');
    return $html ? "<span class='entityqueue-status-overridden' title='{$help}'>" . $label . "</span>" : $label;
  }
  elseif ($status & EXPORT_IN_CODE) {
    $label = t('In code');
    $help = t('A module provides this configuration.');
    return $html ? "<span class='entityqueue-status-default' title='{$help}'>" . $label . "</span>" : $label;
  }
  elseif ($status & EXPORT_IN_DATABASE) {
    $label = t('In database');
    $help = t('A custom configuration by a user.');
    return $html ? "<span class='entityqueue-status-custom' title='{$help}'>" . $label . "</span>" : $label;
  }
}