You are here

function config_pages_context_label in Config Pages 7

Return human readable representation of the context.

4 calls to config_pages_context_label()
config_pages_features_export_options in ./config_pages.features.inc
Implements hook_features_export_options().
config_pages_form_wrapper in ./config_pages.admin.inc
Form callback wrapper: create or edit a config_pages.
config_pages_import_form in ./config_pages.admin.inc
Import form callback.
config_pages_import_form_submit in ./config_pages.admin.inc
config_pages_import_form submit handler.

File

./config_pages.inc, line 240
Logic functions.

Code

function config_pages_context_label($context) {
  if (empty($context)) {
    return t('Global');
  }
  $label = array();
  $context = explode(';', $context);
  foreach ($context as $item) {
    list($group, $value) = explode('=', $item);
    list($module, $key) = explode(':', $group);
    $item = module_invoke($module, 'config_pages_context_label', $key, $value);
    if (empty($item)) {
      $item = $key . '=' . $value;
    }
    $label[] = $item;
  }
  return implode('; ', $label);
}