You are here

function theme_features_storage_link in Features 6

Same name and namespace in other branches
  1. 7.2 theme/theme.inc \theme_features_storage_link()
  2. 7 theme/theme.inc \theme_features_storage_link()

Themes a module status display.

3 theme calls to theme_features_storage_link()
features_admin_components in ./features.admin.inc
Display the components of a feature.
features_admin_form in ./features.admin.inc
admin/build/features page callback.
template_preprocess_features_admin_components in theme/theme.inc
Display feature component info

File

theme/theme.inc, line 142

Code

function theme_features_storage_link($storage, $text = NULL, $path = NULL, $options = array()) {
  $classes = array(
    FEATURES_OVERRIDDEN => 'admin-overridden',
    FEATURES_DEFAULT => 'admin-default',
    FEATURES_NEEDS_REVIEW => 'admin-needs-review',
    FEATURES_REBUILDING => 'admin-rebuilding',
    FEATURES_REBUILDABLE => 'admin-rebuilding',
    FEATURES_CONFLICT => 'admin-conflict',
    FEATURES_DISABLED => 'admin-disabled',
  );
  $default_text = array(
    FEATURES_OVERRIDDEN => t('Overridden'),
    FEATURES_DEFAULT => t('Default'),
    FEATURES_NEEDS_REVIEW => t('Needs review'),
    FEATURES_REBUILDING => t('Rebuilding'),
    FEATURES_REBUILDABLE => t('Rebuilding'),
    FEATURES_CONFLICT => t('Conflict'),
    FEATURES_DISABLED => t('Disabled'),
  );
  $text = isset($text) ? $text : $default_text[$storage];
  if ($path) {
    $options['attributes']['class'] = $classes[$storage] . ' features-storage';
    return l($text, $path, $options);
  }
  else {
    return "<span class='{$classes[$storage]} features-storage'>{$text}</span>";
  }
}