You are here

function configuration_check_filter in Configuration Management 7

1 call to configuration_check_filter()
configuration_filter_format_update in observers/observer.filter.inc
Implements hook_filter_format_update().

File

includes/configuration.filter.inc, line 125

Code

function configuration_check_filter($identifier) {

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

    // Load the current configuration file on disk
    include_once drupal_realpath("config://configuration.filter.inc");

    // Clear the filter cache to get a fresh export.
    cache_clear_all('filter_list_format', 'cache', TRUE);
    drupal_static_reset('filter_list_format');

    // 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 = filter_configuration_export_render('configuration', array(
      $identifier,
    ));
    eval(array_pop($code));
    $formats_code = configuration_filter_default_formats();

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