You are here

function context_features_export_options in Features 6

Implementation of hook_features_export_options();

File

includes/features.context.inc, line 40

Code

function context_features_export_options() {

  // 3.x
  if (context_features_get_version() === 3) {
    return ctools_component_features_export_options('context');
  }

  // 2.x
  $contexts = context_enabled_contexts();
  $options = array();
  foreach ($contexts as $identifier => $context) {
    $options[$identifier] = "{$context->namespace} > {$context->attribute} > {$context->value}";
  }
  return $options;
}