You are here

function configuration_check_image in Configuration Management 7

1 call to configuration_check_image()
configuration_image_style_save in observers/observer.image.inc
Implements hook_image_style_save().

File

includes/configuration.image.inc, line 108

Code

function configuration_check_image($identifier) {

  // Get static variable that we can access across this request.
  $from_activestore =& drupal_static('configuration_from_activestore');
  $component = 'image';
  if (file_exists("config://configuration.image.inc")) {

    // Load the current configuration file on disk
    include_once drupal_realpath("config://configuration.image.inc");
    if (function_exists('configuration_configuration_image_default_styles')) {

      // Clear all caches and flush.
      image_style_flush($identifier);

      // Export just the field we're tracking.
      module_load_include('inc', 'configuration', 'configuration.export');

      // Export the field we just saved and evaluate the export to $fields
      $code = image_configuration_export_render('configuration', array(
        $identifier,
      ));
      eval(array_pop($code));
      $styles_code = configuration_configuration_image_default_styles();

      // If the activestore doesn't exist it is most likely because this configuration
      // only exists in code.
      if (empty($styles)) {
        configuration_set_status($component, $identifier, CONFIGURATION_TRACKED_DATASTORE_ONLY);
      }
      configuration_update_component_status($component, $identifier, $styles, $styles_code, $from_activestore);
    }
  }
}