You are here

function image_configuration_export_render in Configuration Management 7

Implements hook_configuration_export_render().

2 calls to image_configuration_export_render()
configuration_check_image in includes/configuration.image.inc
configuration_hash_image in includes/configuration.image.inc

File

includes/configuration.image.inc, line 52

Code

function image_configuration_export_render($module_name, $data, $export = NULL) {
  $code = array();
  $code[] = '  $styles = array();';
  $code[] = '';
  foreach ($data as $name) {
    if ($style = image_style_load($name)) {
      _image_configuration_style_sanitize($style);
      $style_export = configuration_var_export($style, '  ');
      $style_identifier = configuration_var_export($name);
      $code[] = "  // Exported image style: {$name}";
      $code[] = "  \$styles[{$style_identifier}] = {$style_export};";
      $code[] = "";
    }
  }
  $code[] = '  return $styles;';
  $code = implode("\n", $code);
  return array(
    'configuration_image_default_styles' => $code,
  );
}