function accessibility_test_features_export_render

cis7 accessibility.features.inc accessibility_test_features_export_render($module_name, $data, $export = NULL)
cle7 accessibility.features.inc accessibility_test_features_export_render($module_name, $data, $export = NULL)
elmsmedia7 accessibility.features.inc accessibility_test_features_export_render($module_name, $data, $export = NULL)
icor7 accessibility.features.inc accessibility_test_features_export_render($module_name, $data, $export = NULL)
meedjum_blog7 accessibility.features.inc accessibility_test_features_export_render($module_name, $data, $export = NULL)
mooc7 accessibility.features.inc accessibility_test_features_export_render($module_name, $data, $export = NULL)

Implements hook[component]_features_export_render().

File

sites/all/modules/ulmus/accessibility/accessibility.features.inc, line 33

Code

function accessibility_test_features_export_render($module_name, $data, $export = NULL) {
  if (!function_exists($module_name . 'accessibility_test_default')) {
    module_load_include('inc', $module_name, $module_name . '.accessibility_test');
  }
  $code = array();
  $code[] = '$accessibility_tests = array();';
  foreach ($data as $name) {
    $id = accessibility_get_test_by_machine_name($name);
    $test = accessibility_test_load($id);
    unset($test->test_id);
    unset($test->created);
    unset($test->changed);
    unset($test->rdf_mapping);
    $code[] = "\$accessibility_tests['{$name}'] = (object)" . features_var_export($test) . ";";
  }
  $code[] = "return \$accessibility_tests;";
  $code = implode("\n", $code);
  return array('accessibility_test_default' => $code);
}