You are here

function fe_paths_add_global_settings_to_config in File Entity Paths 7.2

Add default configuration based on file to the end of the loaded configurations.

Parameters

$config:

$file:

1 call to fe_paths_add_global_settings_to_config()
fe_paths_file_process in ./fe_paths.module
Actually pre processes the files. Set a $file->fe_paths_processed flag on the file entity, then add to process queue. The file will be processed on drupal_register_shutdown.

File

./fe_paths.module, line 787
Contains functions for the File Entity Paths module.

Code

function fe_paths_add_global_settings_to_config(&$config, $file) {
  $settings = fe_paths_get_settings($file->type);
  $scheme = file_uri_scheme($file->uri);
  $object = new stdClass();
  $object->id = 0;
  $object->path = $settings[$scheme]['path'];
  $object->filename = $settings[$scheme]['filename'];
  $object->data = array(
    // Always enable to override the defaults!
    'other_config' => 1,
  );
  $config[0] = $object;
}