You are here

function configuration_check_field in Configuration Management 7

1 call to configuration_check_field()
configuration_field_update_instance in observers/observer.field.inc
Implements hook_field_update_instance().

File

includes/configuration.field.inc, line 217

Code

function configuration_check_field($identifier) {

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

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

    // 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 = field_configuration_export_render('configuration', array(
      $identifier,
    ));
    eval(array_pop($code));
    $fields_code = configuration_field_default_fields();

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